Measurements from genders and phonemes

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
fi<- read.csv("allFemaleI.csv", header = TRUE, sep = "\t")
fig<- fi |> mutate(gender = c(rep("F", times = nrow(fi))))
  
fe <- read.csv("allFemaleE.csv", header = TRUE, sep = "\t")
feg<- fe |> mutate(gender = c(rep("F", times = nrow(fe))))

mi<- read.csv("allMaleI.csv", header = TRUE, sep = "\t")
  mig<- mi |> mutate(gender = c(rep("M", times = nrow(mi))))

me <- read.csv("allMaleE.csv", header = TRUE, sep = "\t")
meg<- me |> mutate(gender = c(rep("M", times = nrow(me))))

mfie<- rbind(fig, feg, mig, meg)

#extract the fileName column
#fileNames<- rcds |> select(fileName)
#head(fileNames)

splitting the different segments in the file name into columns because they provide info about the recording

prod <- read.table(text = as.character(mfie$fileName), sep = "_")
head(prod)
##     V1 V2     V3  V4   V5
## 1 subj 10 kiggif  13 Post
## 2 subj 10 kiggif  17 Post
## 3 subj 10 kiggif  26 Post
## 4 subj 10 kiggif AF2   28
## 5 subj 10 kiggif AF2   52
## 6 subj 10 kiggif MN1    1
### removing the ".wav" from the final column
#```{r}
#library(stringr)
#library(dplyr)
#prod <- prod %>% 
#  mutate(V5 =
#   str_sub(prod$V5, end=-5)
#  )
#head(prod)

renaming the column names accordingly

#removing column 1 because it's just "subj"
newcols <- prod %>% 
  select(-V1)
colnames(newcols)
## [1] "V2" "V3" "V4" "V5"
#revert the "Post" and the "seq" for posttest items 
#if v5 = post, v5 = v4, v4 = v5
correctPost <- newcols |> 
  mutate(V51 = ifelse(V5 == "Post", V4, V5),
         V4 = ifelse(V5 == "Post", V5, V4)) |> 
  select(-V5) |> 
  rename("V5" = "V51")

head(correctPost)
##   V2     V3   V4 V5
## 1 10 kiggif Post 13
## 2 10 kiggif Post 17
## 3 10 kiggif Post 26
## 4 10 kiggif  AF2 28
## 5 10 kiggif  AF2 52
## 6 10 kiggif  MN1  1
#rename new columns accordingly
nc<- correctPost %>% 
  rename("subj" = "V2",
         "word" = "V3",
         "block" = "V4",
         "seq" = "V5")

head(nc)
##   subj   word block seq
## 1   10 kiggif  Post  13
## 2   10 kiggif  Post  17
## 3   10 kiggif  Post  26
## 4   10 kiggif   AF2  28
## 5   10 kiggif   AF2  52
## 6   10 kiggif   MN1   1
allcol<- as.data.frame(cbind(mfie$fileName, nc))|> rename("fileName"="mfie$fileName")
colnames(allcol)
## [1] "fileName" "subj"     "word"     "block"    "seq"
df <- full_join(allcol, mfie, by = "fileName") |> rename("F0Hz" = "F0.Hz.", "F1Hz" = "F1.Hz.", "F2Hz" = "F2.Hz.", "F1Bark" = "F1.Bark.", "F2Bark" = "F2.Bark.")

#add column about BB condition

d <- df |> 
   mutate(
    BB = case_when(
      subj == "2" ~ "BB",
      subj == "4" ~ "BB",
      subj == "5" ~ "BB",
      subj == "9" ~ "BB",
      subj == "10" ~ "BB",
      subj == "12" ~ "BB",
      subj == "13" ~ "BB",
      subj == "14" ~ "BB",
      subj == "15" ~ "BB",
      subj == "16" ~ "BB",
      subj == "17" ~ "BB",
      subj == "19" ~ "BB",
      subj == "22" ~ "BB",
      subj == "25" ~ "BB",
      subj == "28" ~ "BB",
      subj == "32" ~ "BB",
      subj == "33" ~ "BB",
      subj == "34" ~ "BB",
      subj == "37" ~ "BB",
      subj == "39" ~ "BB",
      subj == "41" ~ "BB",
      subj == "42" ~ "BB",
      subj == "44" ~ "BB",
      subj == "45" ~ "BB",
      subj == "48" ~ "BB",
      subj == "52" ~ "BB",
      subj == "53" ~ "BB",
      subj == "55" ~ "BB",
      subj == "58" ~ "BB",
      subj == "59" ~ "BB",
      subj == "60" ~ "BB",
      TRUE ~ "NB")
   )

plotting

library(ggplot2)
library(patchwork)
#NB group pre and post for I
nbprei<- d |> filter(BB == "NB", block == "Pre", Label == "I")
nbposti <- d |> filter(BB == "NB", block == "Post", Label == "I")
nbi <- rbind(nbprei, nbposti)

ggplot(data = nbi, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5) + xlim(1200, 3250) + ylim(100, 1750)

#NB group pre and post for E
nbpree<- d |> filter(BB == "NB", block == "Pre", Label == "E")
nbposte <- d |> filter(BB == "NB", block == "Post", Label == "E")
nbe <- rbind(nbpree, nbposte)

ggplot(data = nbe, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.8) + xlim(1200, 3250) + ylim(100, 1750)

#I and E together
nbpre<- d |> filter(BB == "NB", block == "Pre")
nbpost <- d |> filter(BB == "NB", block == "Post")
nb <- rbind(nbpre, nbpost)

ggplot(data = nb, aes(x = F2Hz, y = F1Hz, color = block, shape = Label))+
  geom_point(alpha = 0.7) +xlim(1200, 3250) + ylim(100, 1750)

pi<- ggplot(data = nbi, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5) +xlim(1200, 3250) + ylim(100, 1750) + labs(title = "pre vs post /I/")

pe<-ggplot(data = nbe, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.8) +xlim(1200, 3250) + ylim(100, 1750)+ labs(title = "pre vs post /E/")
pi / pe

library(patchwork)
#BB group pre and post
bbpre<- d |> filter(BB == "BB", block == "Pre") #, Label == "E")
bbpost <- d |> filter(BB == "BB", block == "Post") #,Label == "E")
bb <- rbind(bbpre, bbpost)

#contrast at pretest for BB group
p1 <- ggplot(data = bbpre, aes(x = F2Hz, y = F1Hz, color = Label))+
  geom_point(alpha = 0.5) + xlim(1200,3000) + ylim(100, 1500)+labs(title = "pre")

#contrast at posttest for BB group
p2 <- ggplot(data = bbpost, aes(x = F2Hz, y = F1Hz, color = Label))+
  geom_point(alpha = 0.5) + xlim(1200,3000) + ylim(100, 1500) + labs(title = "post")

p1 + p2

counting subjects

d |> count(subj)
##    subj  n
## 1     1 68
## 2     2 66
## 3     3 67
## 4     4 70
## 5     5 70
## 6     7 72
## 7     9 67
## 8    10 69
## 9    11 72
## 10   12 72
## 11   13 71
## 12   14 72
## 13   15 72
## 14   17 72
## 15   18 71
## 16   19 71
## 17   20 72
## 18   21 69
## 19   22 68
## 20   23 70
## 21   26 72
## 22   27 70
## 23   28 72
## 24   29 72
## 25   30 72
## 26   31 72
## 27   32 69
## 28   33 69
## 29   34 65
## 30   35 72
## 31   36 70
## 32   37 72
## 33   38 72
## 34   40 69
## 35   41 71
## 36   42 71
## 37   43 72
## 38   44 69
## 39   45 71
## 40   46 70
## 41   47 71
## 42   48 71
## 43   49 72
## 44   50 72
## 45   51 72
## 46   52 71
## 47   53 72
## 48   54 71
## 49   55 72
## 50   56 71
## 51   57 71
## 52   58 71
## 53   59 69
## 54   60 65

coding in the block names correctly

E.g., if the participant went through the sequence of AF -> MN, then assign AF1, MN2 to the AF and MN blocks; if the participant went through the sequence of MN -> AF, then assign MN1, AF2 to the AF and MN blocks. Also coding in the bite block condition, since ultimately the analysis is comparing four groups.

#define a function
#correctBlocks <- function(n) {

mn2subj <- c("2", "3", "5", "6", "8", "9", "10", "12", "15", "17", "19", "26", "30", "31", "33", "35", "38", "40", "42", "43", "46", "48", "50", "51", "52", "53", "54", "56", "58", "60")

db <-  d |> 
  mutate(
    block = case_when(
      subj %in% mn2subj & block == "MN1" ~ "MN2",
      subj %in% mn2subj & block == "AF2" ~ "AF1",
      subj %in% mn2subj & block == "Pre" ~ "Pre",
      subj %in% mn2subj & block == "Post" ~ "Post",
      !(subj %in% mn2subj) & block == "MN1" ~ "MN1",
      !(subj %in% mn2subj) & block == "AF2" ~ "AF2",
      !(subj %in% mn2subj) & block == "Pre" ~ "Pre",
      !(subj %in% mn2subj) & block == "Post" ~ "Post"
    )
    )
#}
#check if all subjects are coded correctly

db |> filter(block == "MN2") |> count(subj)
##    subj  n
## 1     2 18
## 2     3 18
## 3     5 18
## 4     9 16
## 5    10 16
## 6    12 18
## 7    15 18
## 8    17 18
## 9    19 17
## 10   26 18
## 11   30 18
## 12   31 18
## 13   33 18
## 14   35 18
## 15   38 18
## 16   40 17
## 17   42 18
## 18   43 18
## 19   46 18
## 20   48 18
## 21   50 18
## 22   51 18
## 23   52 18
## 24   53 18
## 25   54 18
## 26   56 18
## 27   58 18
## 28   60 16
library(ggplot2)
# /E/ in BB group pretest and test
bbprentest<- db |> filter(BB == "BB", Label == "E") |> filter(block == "Pre" | block == "AF1" | block == "MN1" | block == "Post")
#nrow(bbprentest)

ggplot(data = bbprentest, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5)

# /I/ in BB group pretest and test
bbprentest<- db |> filter(BB == "BB", Label == "I") |> filter(block == "Pre" | block == "AF1" | block == "MN1" | block == "Post")
#nrow(bbprentest)

ggplot(data = bbprentest, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5)

#BB group, pre vs post, both phonemes
library(patchwork)
bbprentestE<- db |> filter(BB == "BB", Label == "E") |> filter(block == "Pre" | block == "Post")
bbprentestI<- db |> filter(BB == "BB", Label == "I") |> filter(block == "Pre" | block == "Post")
#nrow(bbprentest)

p1 <- ggplot(data = bbprentestE, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5) + ggtitle("pre/post comparison of /E/")+theme(legend.position="none")

p2 <- ggplot(data = bbprentestI, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5)+ ggtitle("pre/post comparison of /I/")

p1 + p2 

linear regression (all blocks):

#blocks: pre, AF1, MN1, Post

library(lme4)
## Loading required package: Matrix
af1subj <- c("2", "3", "5", "6", "8", "9", "10", "12", "15", "17", "19", "26", "30", "31", "33", "35", "38", "40", "42", "43", "46", "48", "50", "51", "52", "53", "54", "56", "58", "60")

df <- db |> filter(block == "Pre" | block == "AF1" | block == "MN1" | block == "Post") |> 
  mutate(
    AF = case_when(
      subj %in% af1subj ~ "AF",
      TRUE ~ "MN")) |> mutate(
     block = case_when(
      block == "AF1" ~ "2",
      block == "MN1" ~ "2",
      block == "Pre" ~ "1",
      block == "Post" ~ "4")
   )

#change variables into correct data types
df$BB <- as.factor(df$BB)
df$Label <- as.factor(df$Label)
df$block <- as.factor(df$block)
df$gender <- as.factor(df$gender)
df$AF <- as.factor(df$AF)
df$subj <- as.character(df$subj)
df$seq <- as.numeric(df$seq)
df$F0Hz <- as.numeric(df$F0Hz)
## Warning: NAs introduced by coercion
df$F1Hz <- as.numeric(df$F1Hz)
df$F2Hz <- as.numeric(df$F2Hz)
df$F1Bark <- as.numeric(df$F1Bark)
df$F2Bark <- as.numeric(df$F2Bark)

write.csv(df, "productionFullTable.csv")

#contrast coding
df$BB <- relevel(df$BB, ref = "NB")

df$Label <- relevel(df$Label, ref = "I")

df$block <- relevel(df$block, ref = "1")

df$gender <- relevel(df$gender, ref = "F")

#model with blocks 1,2,4
f1hzallbl <- lmer(F1Hz ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = df)
summary(f1hzallbl)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * AF * Label + gender + (1 | subj) + (1 | word)
##    Data: df
## 
## REML criterion at convergence: 32608.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.4079 -0.5143  0.0383  0.5118 16.4201 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3096.4   55.65   
##  word     (Intercept)  132.3   11.50   
##  Residual             5493.9   74.12   
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                         Estimate Std. Error t value
## (Intercept)             450.7640    18.8082  23.966
## block2                    0.6292     9.7768   0.064
## block4                   14.8829     9.7121   1.532
## BBBB                      9.2792    23.1196   0.401
## AFMN                    -18.6968    24.1381  -0.775
## LabelE                  147.4586    13.5919  10.849
## genderM                 -96.9882    21.2561  -4.563
## block2:BBBB              36.7918    13.3972   2.746
## block4:BBBB             -24.5214    13.3629  -1.835
## block2:AFMN              63.0118    13.8559   4.548
## block4:AFMN             -28.1106    13.7801  -2.040
## BBBB:AFMN                -9.7971    33.2636  -0.295
## block2:LabelE            -8.1994    13.8630  -0.591
## block4:LabelE           -18.4500    13.8138  -1.336
## BBBB:LabelE             -20.8307    13.4341  -1.551
## AFMN:LabelE              39.3578    13.8591   2.840
## block2:BBBB:AFMN        -23.3488    19.3244  -1.208
## block4:BBBB:AFMN         36.4373    19.2392   1.894
## block2:BBBB:LabelE       -9.4693    18.9657  -0.499
## block4:BBBB:LabelE       30.9208    18.9483   1.632
## block2:AFMN:LabelE       35.7435    19.5786   1.826
## block4:AFMN:LabelE       27.4315    19.5549   1.403
## BBBB:AFMN:LabelE        -23.8587    19.2555  -1.239
## block2:BBBB:AFMN:LabelE -29.3712    27.2894  -1.076
## block4:BBBB:AFMN:LabelE -36.1044    27.2431  -1.325
## 
## Correlation matrix not shown by default, as p = 25 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Interpretations:

Estimate Std. Error t value

block2 0.6292 9.7768 0.064 in the NB group, F1 in /I/ at test did not differ from pretest, for female speakers

block4 14.8829 9.7121 1.532 in the NB group, F1 in /I/ at posttest did not differ from pretest, for female speakers

BBBB 9.2792 23.1196 0.401 the F1 in /I/ in BB group did not differ from the NB group at pretest, for female speakers

AFMN -18.6968 24.1381 -0.775 the F1 in /I/ in the MN group did not differ from the AF group at pretest, for female speakers

LabelE 147.4586 13.5919 10.849 the F1 for /E/ in the NB group is 147.4586 Hz higher than /I/ at pretest, for female speakers

genderM -96.9882 21.2561 -4.563 at pretest, male speakers have an F1 in /I/ that is 96.9882 Hz lower than that of female speakers

block2:BBBB 36.7918 13.3972 2.746 the F1 increase in /I/ from pretest to test is 36.7918 Hz higher in the BB group than in the NB and AF group, for female speakers

block4:BBBB -24.5214 13.3629 -1.835 the difference in F1 from pretest to posttest did not differ between BB and NB group (female speakers)

block2:AFMN 63.0118 13.8559 4.548 from pretest to test, the F1 in /I/ in the NBMN group increased 63.0118 Hz more than the NBAF group (f speakers)

block4:AFMN -28.1106 13.7801 -2.040 at posttest the F1 in /I/ in the MN group is 28.11 Hz lower than at pretest

BBBB:AFMN -9.7971 33.2636 -0.295 the F1 in /I/ did not differ between BBAF and BBMN group at pretest

block2:LabelE -8.1994 13.8630 -0.591 the F1 difference between /I/ and /E/ is not bigger in the NB group when comparing test to pretest

block4:LabelE -18.4500 13.8138 -1.336 the difference in F1 between /I/ and /E/ did not change from pre to posttest for the NB group

BBBB:LabelE -20.8307 13.4341 -1.551 the difference in F1 between /I/ and /E/ did not differ between BB and NB group at pretest

AFMN:LabelE 39.3578 13.8591 2.840 the difference in F1 between /I/ and /E/ is 39 Hz bigger in the NBMN group than in the NBAF group at pretest

block2:BBBB:AFMN -23.3488 19.3244 -1.208 when comparing test to pretest, the AF/MN did not affect the effect that BB has on the F1 of /I/

block4:BBBB:AFMN 36.4373 19.2392 1.894 when comparing posttest to pretest, the AF/MN did not affect the effect that BB has on the F1 of /I/

block2:BBBB:LabelE -9.4693 18.9657 -0.499 when comparing test to pretest, BB did not affect the difference between /I/ and /E/ in the AF group

block4:BBBB:LabelE 30.9208 18.9483 1.632 when comparing posttest to pretest, BB did not affect the difference between /I/ and /E/ in the AF group

block2:AFMN:LabelE 35.7435 19.5786 1.826 when comparing test to pretest, MN did not affect the difference between /I/ and /E/ in the NB group

block4:AFMN:LabelE 27.4315 19.5549 1.403 when comparing posttest to pretest, MN did not affect the difference between /I/ and /E/ in the NB group

BBBB:AFMN:LabelE -23.8587 19.2555 -1.239 at pretest, the difference between /I/ and /E/ caused by being in the BB group (not significant) was not modulated by being assigned in the MN group

block2:BBBB:AFMN:LabelE -29.3712 27.2894 -1.076 when comparing test to pretest, the effect of BB on the /I/-/E/ contrast (not significant, see block2:BBBB:LabelE) was not modulated by the MN

block4:BBBB:AFMN:LabelE -36.1044 27.2431 -1.325 when comparing posttest to pretest, the effect of BB on the /I/-/E/ contrast (not significant, see block4:BBBB:LabelE) was not modulated by the MN

#effect plots
library (effects)
## Loading required package: carData
## lattice theme set by effectsTheme()
## See ?effectsTheme for details.
 eall.f1hzallbl <- predictorEffects(f1hzallbl)
 #plot(eall.f1hzallbl)
 #plot(predictorEffects(f1hzallbl, ~BB))
 #plot(predictorEffects(f1hzallbl, ~block))
 plot(predictorEffects(f1hzallbl, ~Label))

# BB group, pre vs test, both phonemes

bbprentestE<- df |> filter(BB == "BB", Label == "E") |> filter(block == "1" | block == "2") |> mutate(block = case_when(block == "1" ~ "pretest",
                        block == "2" ~ "test"))
bbprentestI<- df |> filter(BB == "BB", Label == "I") |> filter(block == "1" | block == "2")|> mutate(block = case_when(block == "1" ~ "pretest",
                        block == "2" ~ "test"))
#nrow(bbprentest)

p1 <- ggplot(data = bbprentestE, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5) + ylim (200, 1500) + ggtitle("bite block effect for /E/")+theme(legend.position="none")

p2 <- ggplot(data = bbprentestI, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5) + ylim (200, 1500) + ggtitle("bite block effect for /I/")

p1 + p2 
## Warning: Removed 1 row containing missing values or values outside the scale range
## (`geom_point()`).

#### similar model on F2

f2hzallbl <- lmer(F2Hz ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = df)
summary(f2hzallbl)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * AF * Label + gender + (1 | subj) + (1 | word)
##    Data: df
## 
## REML criterion at convergence: 35901.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.2993 -0.5454 -0.0166  0.5149  5.8049 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 11216    105.90  
##  word     (Intercept)  9938     99.69  
##  Residual             17535    132.42  
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                         Estimate Std. Error t value
## (Intercept)             2200.053     66.434  33.116
## block2                    -9.267     17.467  -0.531
## block4                   -56.774     17.351  -3.272
## BBBB                     -79.686     43.562  -1.829
## AFMN                       5.520     45.488   0.121
## LabelE                  -255.947     83.267  -3.074
## genderM                 -239.801     40.375  -5.939
## block2:BBBB             -651.743     23.935 -27.230
## block4:BBBB               28.908     23.874   1.211
## block2:AFMN              -54.598     24.754  -2.206
## block4:AFMN               46.824     24.619   1.902
## BBBB:AFMN                 97.834     62.676   1.561
## block2:LabelE            -15.246     24.767  -0.616
## block4:LabelE             43.164     24.679   1.749
## BBBB:LabelE               65.757     24.001   2.740
## AFMN:LabelE                6.270     24.760   0.253
## block2:BBBB:AFMN         -85.069     34.524  -2.464
## block4:BBBB:AFMN         -60.424     34.372  -1.758
## block2:BBBB:LabelE       190.195     33.883   5.613
## block4:BBBB:LabelE       -38.486     33.852  -1.137
## block2:AFMN:LabelE        36.238     34.978   1.036
## block4:AFMN:LabelE       -33.284     34.936  -0.953
## BBBB:AFMN:LabelE         -62.233     34.401  -1.809
## block2:BBBB:AFMN:LabelE    8.991     48.754   0.184
## block4:BBBB:AFMN:LabelE   25.526     48.672   0.524
## 
## Correlation matrix not shown by default, as p = 25 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Significant results:

                    Estimate Std. Error t value
                    

block4 -56.774 17.351 -3.272 in the NB group, F2 in /I/ at posttest is 56.774 Hz lower than pretest, for female speakers

LabelE -255.947 83.267 -3.074 at pretest female speakers’ F2 in /E/ is 255.947 Hz lower than their F2 in /I/

genderM -239.801 40.375 -5.939 at pretest female speakers’ F2 in /I/ 239.801 Hz lower than the females speakers

block2:BBBB -651.743 23.935 -27.230 the change of F2 in /I/ from pretest to test is 651.743 Hz smaller in the BB group when compared to BB group (which did not change) ==> the F2 in BB group decreased 651.743 Hz at test when compared to pretest (for female speakers)

block4:BBBB -24.5214 13.3629 -1.835 the difference in F1 from pretest to posttest did not differ between BB and NB group (female speakers)

block4:BBBB 28.908 23.874 1.211 the change in F2 in /I/ from pretest to posttest (sig. in NB group) is not modulated by being in the BB group (having BB did not change the “base” effect) (for female speakers)

block2:AFMN -54.598 24.754 -2.206 the change in F2 in /I/ for the NB group from pretest to test (not sig.) isn ot modualted by MN (for female speakers)

block4:AFMN 46.824 24.619 1.902 the change in F2 in /I/ for the NB from pretest to posttest (sig.) is not modulated by MN (having MN did not change the “base” effect) (for female speakers)

BBBB:LabelE 65.757 24.001 2.740 the F2 difference between /I/ and /E/ is 65.757 Hz higher in the BB group than the NB group at pretest (for female speakers)

block2:BBBB:AFMN -85.069 34.524 -2.464 having MN decreased the F2 shift from test to pretest in the BB group (sig.) for 85.069 Hz (for female speakers)

block2:BBBB:LabelE 190.195 33.883 5.613 when comparing test to pretest, BB increased the F2 difference between /I/ and /E/ in the AF group (sig.) for 190.195 Hz (for female speakers)

block4:BBBB:LabelE -38.486 33.852 -1.137 when comparing posttest to pretest, having had the BB did not affect the F2 difference between /I/ and /E/ in the AF group (not sig.)(for female speakers).

block2:AFMN:LabelE 36.238 34.978 1.036 MN did not affect the /I/-/E/ contrast in F2 in the NB group at test (for female speakers)

block4:AFMN:LabelE -33.284 34.936 -0.953 MN did not affect the /I/-/E/ contrast in F2 in the NB group at posttest (for female speakers)

block2:BBBB:AFMN:LabelE 8.991 48.754 0.184 MN did not affect the effect that BB has on the /I/-/E/ contrast in F2 at test (for female speakers) block4:BBBB:AFMN:LabelE 25.526 48.672 0.524 MN did not affect the effect that BB has on the /I/-/E/ contrast in F2 at posttest (for female speakers)

model including sequence number as a variable

#convert seq as numeric instead of categorical
df$seq <- as.numeric(df$seq)
#seq as a separate variable
f1hzallblsq1 <- lmer(F1Hz ~ block * BB * AF* Label +  seq + gender + (1|subj) + (1|word), data = df)
summary(f1hzallblsq1)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * AF * Label + seq + gender + (1 | subj) +  
##     (1 | word)
##    Data: df
## 
## REML criterion at convergence: 32609.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.4209 -0.5126  0.0397  0.5079 16.4523 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3096     55.64   
##  word     (Intercept)  134     11.58   
##  Residual             5492     74.11   
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                          Estimate Std. Error t value
## (Intercept)             453.94339   18.97583  23.922
## block2                    0.68420    9.77555   0.070
## block4                   14.81309    9.71091   1.525
## BBBB                      8.98581   23.11781   0.389
## AFMN                    -18.81789   24.13532  -0.780
## LabelE                  147.18887   13.63335  10.796
## seq                      -0.11784    0.08967  -1.314
## genderM                 -97.08227   21.25369  -4.568
## block2:BBBB              37.01150   13.39637   2.763
## block4:BBBB             -24.28797   13.36223  -1.818
## block2:AFMN              63.05772   13.85402   4.552
## block4:AFMN             -27.84721   13.77966  -2.021
## BBBB:AFMN                -9.28651   33.26181  -0.279
## block2:LabelE            -8.27694   13.86126  -0.597
## block4:LabelE           -18.10164   13.81444  -1.310
## BBBB:LabelE             -20.14902   13.44223  -1.499
## AFMN:LabelE              39.79007   13.86106   2.871
## block2:BBBB:AFMN        -23.86539   19.32573  -1.235
## block4:BBBB:AFMN         35.97379   19.23983   1.870
## block2:BBBB:LabelE       -9.95622   18.96677  -0.525
## block4:BBBB:LabelE       30.28566   18.95189   1.598
## block2:AFMN:LabelE       35.85172   19.57609   1.831
## block4:AFMN:LabelE       26.78403   19.55841   1.369
## BBBB:AFMN:LabelE        -24.63411   19.26195  -1.279
## block2:BBBB:AFMN:LabelE -29.13322   27.28627  -1.068
## block4:BBBB:AFMN:LabelE -35.40983   27.24453  -1.300
## 
## Correlation matrix not shown by default, as p = 26 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

seq itself is not significant.

#seq as interaction in hertz model
f1hzallblsq <- lmer(F1Hz ~ block * BB * AF* Label * seq + gender + (1|subj) + (1|word), data = df)
summary(f1hzallblsq)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * AF * Label * seq + gender + (1 | subj) +  
##     (1 | word)
##    Data: df
## 
## REML criterion at convergence: 32561.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.5479 -0.5204  0.0382  0.5162 16.2347 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3097     55.65   
##  word     (Intercept)  137     11.70   
##  Residual             5458     73.88   
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                               Estimate Std. Error t value
## (Intercept)                 453.569002  22.383403  20.264
## block2                        0.694851  19.918535   0.035
## block4                      -12.465988  19.538823  -0.638
## BBBB                         12.308602  27.918045   0.441
## AFMN                        -14.629281  29.235276  -0.500
## LabelE                      127.285342  21.333875   5.966
## seq                          -0.105443   0.449356  -0.235
## genderM                     -96.853478  21.256326  -4.556
## block2:BBBB                  21.667816  26.374745   0.822
## block4:BBBB                   1.384655  25.922118   0.053
## block2:AFMN                  64.403717  27.563602   2.337
## block4:AFMN                 -13.699684  27.430525  -0.499
## BBBB:AFMN                   -24.363365  40.468682  -0.602
## block2:LabelE                 9.727838  27.361416   0.356
## block4:LabelE                35.254971  27.218245   1.295
## BBBB:LabelE                   0.532953  26.262855   0.020
## AFMN:LabelE                  47.316420  26.749871   1.769
## block2:seq                   -0.001075   0.641695  -0.002
## block4:seq                    1.040861   0.640452   1.625
## BBBB:seq                     -0.136151   0.610426  -0.223
## AFMN:seq                     -0.160133   0.625337  -0.256
## LabelE:seq                    0.810170   0.635859   1.274
## block2:BBBB:AFMN             10.165262  38.112746   0.267
## block4:BBBB:AFMN             -0.794306  38.286573  -0.021
## block2:BBBB:LabelE           -5.322872  37.090110  -0.144
## block4:BBBB:LabelE          -13.339072  37.342183  -0.357
## block2:AFMN:LabelE           23.163589  39.017167   0.594
## block4:AFMN:LabelE          -15.719360  38.316997  -0.410
## BBBB:AFMN:LabelE             -1.756773  37.952125  -0.046
## block2:BBBB:seq               0.588238   0.863211   0.681
## block4:BBBB:seq              -0.971644   0.861193  -1.128
## block2:AFMN:seq              -0.045073   0.892541  -0.050
## block4:AFMN:seq              -0.555470   0.891860  -0.623
## BBBB:AFMN:seq                 0.569734   0.877349   0.649
## block2:LabelE:seq            -0.730490   0.915852  -0.798
## block4:LabelE:seq            -2.081253   0.898202  -2.317
## BBBB:LabelE:seq              -0.823171   0.870897  -0.945
## AFMN:LabelE:seq              -0.348976   0.876285  -0.398
## block2:BBBB:AFMN:LabelE     -37.480605  54.123379  -0.693
## block4:BBBB:AFMN:LabelE       2.850314  54.108715   0.053
## block2:BBBB:AFMN:seq         -1.295221   1.240900  -1.044
## block4:BBBB:AFMN:seq          1.370336   1.247733   1.098
## block2:BBBB:LabelE:seq       -0.158216   1.231770  -0.128
## block4:BBBB:LabelE:seq        1.703560   1.230058   1.385
## block2:AFMN:LabelE:seq        0.529280   1.276857   0.415
## block4:AFMN:LabelE:seq        1.693677   1.247495   1.358
## BBBB:AFMN:LabelE:seq         -0.744507   1.228994  -0.606
## block2:BBBB:AFMN:LabelE:seq   0.118929   1.770825   0.067
## block4:BBBB:AFMN:LabelE:seq  -1.555320   1.756269  -0.886
## 
## Correlation matrix not shown by default, as p = 49 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

seq itself is not significant. The only significant interaction is block4:LabelE:seq. Interpretation: the difference of the /I/-/E/ contrast between block 2 and block 4 (diff of diff) is modified by the sequence. As sequence increase 1, the contrast decreases by 2.85 Hz. But since the intercept is on the NB group. This is only about the group without bite blocks. block4:BBBB:LabelE:seq is not significant.

#try releveling the reference level to BB to check if block4:LabelE:seq is significant
df$BB <- relevel(df$BB, ref = "BB")
f1hzallblsqrl <- lmer(F1Hz ~ block * BB * AF* Label * seq + gender + (1|subj) + (1|word), data = df)
summary(f1hzallblsqrl)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * AF * Label * seq + gender + (1 | subj) +  
##     (1 | word)
##    Data: df
## 
## REML criterion at convergence: 32561.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.5479 -0.5204  0.0382  0.5162 16.2347 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3097     55.65   
##  word     (Intercept)  137     11.70   
##  Residual             5458     73.88   
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                              Estimate Std. Error t value
## (Intercept)                 465.87760   20.64867  22.562
## block2                       22.36267   17.29093   1.293
## block4                      -11.08133   17.03638  -0.650
## BBNB                        -12.30860   27.91804  -0.441
## AFMN                        -38.99265   28.47355  -1.369
## LabelE                      127.81830   20.42798   6.257
## seq                          -0.24159    0.41331  -0.585
## genderM                     -96.85348   21.25633  -4.556
## block2:BBNB                 -21.66782   26.37475  -0.822
## block4:BBNB                  -1.38466   25.92212  -0.053
## block2:AFMN                  74.56898   26.33223   2.832
## block4:AFMN                 -14.49399   26.70058  -0.543
## BBNB:AFMN                    24.36336   40.46868   0.602
## block2:LabelE                 4.40497   25.04228   0.176
## block4:LabelE                21.91590   25.54744   0.858
## BBNB:LabelE                  -0.53295   26.26285  -0.020
## AFMN:LabelE                  45.55965   26.93729   1.691
## block2:seq                    0.58716    0.57742   1.017
## block4:seq                    0.06922    0.57574   0.120
## BBNB:seq                      0.13615    0.61043   0.223
## AFMN:seq                      0.40960    0.61600   0.665
## LabelE:seq                   -0.01300    0.59514  -0.022
## block2:BBNB:AFMN            -10.16526   38.11275  -0.267
## block4:BBNB:AFMN              0.79431   38.28657   0.021
## block2:BBNB:LabelE            5.32287   37.09011   0.144
## block4:BBNB:LabelE           13.33907   37.34218   0.357
## block2:AFMN:LabelE          -14.31702   37.51885  -0.382
## block4:AFMN:LabelE          -12.86905   38.18543  -0.337
## BBNB:AFMN:LabelE              1.75677   37.95212   0.046
## block2:BBNB:seq              -0.58824    0.86321  -0.681
## block4:BBNB:seq               0.97164    0.86119   1.128
## block2:AFMN:seq              -1.34029    0.86258  -1.554
## block4:AFMN:seq               0.81487    0.87235   0.934
## BBNB:AFMN:seq                -0.56973    0.87735  -0.649
## block2:LabelE:seq            -0.88871    0.82372  -1.079
## block4:LabelE:seq            -0.37769    0.83956  -0.450
## BBNB:LabelE:seq               0.82317    0.87090   0.945
## AFMN:LabelE:seq              -1.09348    0.86245  -1.268
## block2:BBNB:AFMN:LabelE      37.48060   54.12338   0.693
## block4:BBNB:AFMN:LabelE      -2.85031   54.10871  -0.053
## block2:BBNB:AFMN:seq          1.29522    1.24090   1.044
## block4:BBNB:AFMN:seq         -1.37034    1.24773  -1.098
## block2:BBNB:LabelE:seq        0.15822    1.23177   0.128
## block4:BBNB:LabelE:seq       -1.70356    1.23006  -1.385
## block2:AFMN:LabelE:seq        0.64821    1.22734   0.528
## block4:AFMN:LabelE:seq        0.13836    1.23554   0.112
## BBNB:AFMN:LabelE:seq          0.74451    1.22899   0.606
## block2:BBNB:AFMN:LabelE:seq  -0.11893    1.77082  -0.067
## block4:BBNB:AFMN:LabelE:seq   1.55532    1.75627   0.886
## 
## Correlation matrix not shown by default, as p = 49 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Not.

#bark model with seq
#correct back to NB as reference
df$BB <- relevel(df$BB, ref = "NB")

f1bkallblsq <- lmer(F1Bark ~ block * BB * AF* Label * seq + gender + (1|subj) + (1|word), data = df)
summary(f1bkallblsq)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Bark ~ block * BB * AF * Label * seq + gender + (1 | subj) +  
##     (1 | word)
##    Data: df
## 
## REML criterion at convergence: 6071.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.2400 -0.6094  0.0031  0.5904 11.5905 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 0.19863  0.44568 
##  word     (Intercept) 0.00688  0.08294 
##  Residual             0.42361  0.65086 
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                               Estimate Std. Error t value
## (Intercept)                  4.5809941  0.1846953  24.803
## block2                      -0.0422332  0.1754793  -0.241
## block4                      -0.0760253  0.1721333  -0.442
## BBBB                         0.0433653  0.2334445   0.186
## AFMN                        -0.1460593  0.2444995  -0.597
## LabelE                       1.0536870  0.1811664   5.816
## seq                         -0.0029714  0.0039587  -0.751
## genderM                     -0.7973375  0.1708296  -4.667
## block2:BBBB                  0.2289985  0.2323565   0.986
## block4:BBBB                 -0.0507522  0.2283634  -0.222
## block2:AFMN                  0.5748125  0.2428270   2.367
## block4:AFMN                 -0.2152174  0.2416602  -0.891
## BBBB:AFMN                   -0.1059761  0.3386624  -0.313
## block2:LabelE                0.0868794  0.2410493   0.360
## block4:LabelE                0.2318649  0.2397802   0.967
## BBBB:LabelE                  0.0123174  0.2313694   0.053
## AFMN:LabelE                  0.4032193  0.2356614   1.711
## block2:seq                   0.0008324  0.0056532   0.147
## block4:seq                   0.0057264  0.0056422   1.015
## BBBB:seq                     0.0015958  0.0053777   0.297
## AFMN:seq                    -0.0010558  0.0055091  -0.192
## LabelE:seq                   0.0069009  0.0056016   1.232
## block2:BBBB:AFMN            -0.0598676  0.3357556  -0.178
## block4:BBBB:AFMN             0.0711472  0.3372809   0.211
## block2:BBBB:LabelE          -0.0391282  0.3267573  -0.120
## block4:BBBB:LabelE           0.0252423  0.3289558   0.077
## block2:AFMN:LabelE           0.0967545  0.3437245   0.281
## block4:AFMN:LabelE           0.0318042  0.3375588   0.094
## BBBB:AFMN:LabelE            -0.0410696  0.3343484  -0.123
## block2:BBBB:seq              0.0032898  0.0076046   0.433
## block4:BBBB:seq             -0.0073793  0.0075866  -0.973
## block2:AFMN:seq              0.0019215  0.0078629   0.244
## block4:AFMN:seq             -0.0005979  0.0078571  -0.076
## BBBB:AFMN:seq                0.0040791  0.0077290   0.528
## block2:LabelE:seq           -0.0052679  0.0080684  -0.653
## block4:LabelE:seq           -0.0127973  0.0079126  -1.617
## BBBB:LabelE:seq             -0.0076302  0.0076723  -0.995
## AFMN:LabelE:seq             -0.0050471  0.0077198  -0.654
## block2:BBBB:AFMN:LabelE     -0.1593360  0.4768049  -0.334
## block4:BBBB:AFMN:LabelE     -0.2010132  0.4766596  -0.422
## block2:BBBB:AFMN:seq        -0.0123218  0.0109315  -1.127
## block4:BBBB:AFMN:seq         0.0101097  0.0109915   0.920
## block2:BBBB:LabelE:seq      -0.0021582  0.0108515  -0.199
## block4:BBBB:LabelE:seq       0.0115886  0.0108356   1.069
## block2:AFMN:LabelE:seq       0.0016732  0.0112483   0.149
## block4:AFMN:LabelE:seq       0.0113822  0.0109897   1.036
## BBBB:AFMN:LabelE:seq        -0.0042692  0.0108270  -0.394
## block2:BBBB:AFMN:LabelE:seq  0.0031307  0.0156000   0.201
## block4:BBBB:AFMN:LabelE:seq -0.0112874  0.0154711  -0.730
## 
## Correlation matrix not shown by default, as p = 49 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Nothing involving seq is significant in the bark model.

#F2 model in bark
f2hzallblsq <- lmer(F2Hz ~ block * BB * AF* Label * seq + gender + (1|subj) + (1|word), data = df)
summary(f2hzallblsq)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * AF * Label * seq + gender + (1 | subj) +  
##     (1 | word)
##    Data: df
## 
## REML criterion at convergence: 35824.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.3893 -0.5403 -0.0210  0.5273  5.6621 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 11310    106.35  
##  word     (Intercept)  9826     99.13  
##  Residual             17403    131.92  
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                               Estimate Std. Error t value
## (Intercept)                 2198.63474   69.63184  31.575
## block2                         7.82478   35.57051   0.220
## block4                       -86.34025   34.89222  -2.474
## BBBB                         -88.78280   51.88319  -1.711
## AFMN                         -35.76408   54.32488  -0.658
## LabelE                      -232.64020   87.81167  -2.649
## seq                            0.05726    0.80246   0.071
## genderM                     -240.30049   40.53803  -5.928
## block2:BBBB                 -645.83112   47.10080 -13.712
## block4:BBBB                   76.74581   46.29401   1.658
## block2:AFMN                  -36.15632   49.22528  -0.735
## block4:AFMN                  133.29846   48.98492   2.721
## BBBB:AFMN                    138.80221   75.16615   1.847
## block2:LabelE                -46.25654   48.86237  -0.947
## block4:LabelE                 61.55774   48.60761   1.266
## BBBB:LabelE                   56.27668   46.90091   1.200
## AFMN:LabelE                    0.49400   47.77022   0.010
## block2:seq                    -0.62846    1.14595  -0.548
## block4:seq                     1.12952    1.14372   0.988
## BBBB:seq                       0.38247    1.09012   0.351
## AFMN:seq                       1.59333    1.11674   1.427
## LabelE:seq                    -0.94468    1.13556  -0.832
## block2:BBBB:AFMN             -76.02562   68.06706  -1.117
## block4:BBBB:AFMN            -116.37837   68.37955  -1.702
## block2:BBBB:LabelE           202.06710   66.23631   3.051
## block4:BBBB:LabelE           -30.21319   66.69212  -0.453
## block2:AFMN:LabelE            34.77917   69.67939   0.499
## block4:AFMN:LabelE           -62.84834   68.42744  -0.918
## BBBB:AFMN:LabelE             -55.17415   67.77672  -0.814
## block2:BBBB:seq               -0.27548    1.54158  -0.179
## block4:BBBB:seq               -1.86635    1.53805  -1.213
## block2:AFMN:seq               -0.75118    1.59401  -0.471
## block4:AFMN:seq               -3.29466    1.59268  -2.069
## BBBB:AFMN:seq                 -1.64068    1.56688  -1.047
## block2:LabelE:seq              1.19317    1.63556   0.730
## block4:LabelE:seq             -0.63627    1.60407  -0.397
## BBBB:LabelE:seq                0.38826    1.55529   0.250
## AFMN:LabelE:seq                0.21977    1.56491   0.140
## block2:BBBB:AFMN:LabelE       67.28206   96.65795   0.696
## block4:BBBB:AFMN:LabelE      -32.93399   96.63682  -0.341
## block2:BBBB:AFMN:seq          -0.26172    2.21623  -0.118
## block4:BBBB:AFMN:seq           2.25621    2.22851   1.012
## block2:BBBB:LabelE:seq        -0.45108    2.19976  -0.205
## block4:BBBB:LabelE:seq        -0.30785    2.19694  -0.140
## block2:AFMN:LabelE:seq         0.04045    2.28034   0.018
## block4:AFMN:LabelE:seq         1.09435    2.22785   0.491
## BBBB:AFMN:LabelE:seq          -0.20467    2.19483  -0.093
## block2:BBBB:AFMN:LabelE:seq   -2.44684    3.16254  -0.774
## block4:BBBB:AFMN:LabelE:seq    2.09309    3.13675   0.667
## 
## Correlation matrix not shown by default, as p = 49 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Nothing involving seq is significant.

#F2 model in bark
f2bkallblsq <- lmer(F2Bark ~ block * BB * AF* Label * seq + gender + (1|subj) + (1|word), data = df)
summary(f2bkallblsq)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Bark ~ block * BB * AF * Label * seq + gender + (1 | subj) +  
##     (1 | word)
##    Data: df
## 
## REML criterion at convergence: 5385.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.3755 -0.5544  0.0030  0.6030  3.6936 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 0.13158  0.3627  
##  word     (Intercept) 0.09797  0.3130  
##  Residual             0.33111  0.5754  
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                               Estimate Std. Error t value
## (Intercept)                 13.5804002  0.2356460  57.631
## block2                      -0.1104026  0.1551391  -0.712
## block4                      -0.2654031  0.1521764  -1.744
## BBBB                        -0.3211376  0.1979699  -1.622
## AFMN                        -0.1073032  0.2073753  -0.517
## LabelE                      -0.7667017  0.2956099  -2.594
## seq                         -0.0018356  0.0034997  -0.525
## genderM                     -0.8816616  0.1395343  -6.319
## block2:BBBB                 -2.3915642  0.2054309 -11.642
## block4:BBBB                  0.2583066  0.2019062   1.279
## block2:AFMN                 -0.0720172  0.2146976  -0.335
## block4:AFMN                  0.3278160  0.2136461   1.534
## BBBB:AFMN                    0.3399638  0.2874145   1.183
## block2:LabelE                0.0184801  0.2131119   0.087
## block4:LabelE                0.1654170  0.2119821   0.780
## BBBB:LabelE                  0.1734905  0.2045541   0.848
## AFMN:LabelE                 -0.0656063  0.2083470  -0.315
## block2:seq                   0.0026565  0.0049979   0.532
## block4:seq                   0.0037764  0.0049880   0.757
## BBBB:seq                     0.0033084  0.0047544   0.696
## AFMN:seq                     0.0049168  0.0048705   1.010
## LabelE:seq                   0.0001313  0.0049525   0.027
## block2:BBBB:AFMN            -0.0619287  0.2968747  -0.209
## block4:BBBB:AFMN            -0.2845105  0.2982344  -0.954
## block2:BBBB:LabelE           0.3876647  0.2888899   1.342
## block4:BBBB:LabelE          -0.0666004  0.2908500  -0.229
## block2:AFMN:LabelE          -0.0402135  0.3038880  -0.132
## block4:AFMN:LabelE          -0.1721993  0.2984237  -0.577
## BBBB:AFMN:LabelE            -0.0175606  0.2956062  -0.059
## block2:BBBB:seq             -0.0066366  0.0067235  -0.987
## block4:BBBB:seq             -0.0075953  0.0067078  -1.132
## block2:AFMN:seq             -0.0048580  0.0069522  -0.699
## block4:AFMN:seq             -0.0089318  0.0069462  -1.286
## BBBB:AFMN:seq               -0.0014945  0.0068338  -0.219
## block2:LabelE:seq           -0.0044310  0.0071334  -0.621
## block4:LabelE:seq           -0.0043017  0.0069952  -0.615
## BBBB:LabelE:seq             -0.0032561  0.0067832  -0.480
## AFMN:LabelE:seq             -0.0002505  0.0068251  -0.037
## block2:BBBB:AFMN:LabelE      0.2719617  0.4215589   0.645
## block4:BBBB:AFMN:LabelE     -0.1559470  0.4214541  -0.370
## block2:BBBB:AFMN:seq        -0.0056539  0.0096659  -0.585
## block4:BBBB:AFMN:seq         0.0050381  0.0097192   0.518
## block2:BBBB:LabelE:seq       0.0133406  0.0095941   1.391
## block4:BBBB:LabelE:seq       0.0036973  0.0095807   0.386
## block2:AFMN:LabelE:seq       0.0082206  0.0099448   0.827
## block4:AFMN:LabelE:seq       0.0078683  0.0097155   0.810
## BBBB:AFMN:LabelE:seq        -0.0028381  0.0095725  -0.296
## block2:BBBB:AFMN:LabelE:seq -0.0162579  0.0137926  -1.179
## block4:BBBB:AFMN:LabelE:seq  0.0030418  0.0136795   0.222
## 
## Correlation matrix not shown by default, as p = 49 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Nothing involving seq is significant.

interaction plots

#model for pretest vs test in order to only plot the interaction effect in pre vs post
prentest <- df |> filter(block == "1" | block == "2")|> mutate(block = case_when(block == "1" ~ "pretest",
                        block == "2" ~ "test"))

f2hzprentest <- lmer(F2Hz ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = prentest)
#effect plot
library(effects)
plot(effect( "block * BB * AF", f2hzprentest))
## NOTE: block:BB:AF is not a high-order term in the model

#bark model
f1barkallbl <- lmer(F1Bark ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = df)
summary(f1barkallbl)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Bark ~ block * BB * AF * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: df
## 
## REML criterion at convergence: 5888.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.1009 -0.6093  0.0061  0.6128 11.6410 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 0.199013 0.44611 
##  word     (Intercept) 0.006484 0.08052 
##  Residual             0.425990 0.65268 
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                          Estimate Std. Error t value
## (Intercept)              4.501109   0.150669  29.874
## block2                  -0.020860   0.086091  -0.242
## block4                   0.075867   0.085521   0.887
## BBBB                     0.089611   0.188519   0.475
## AFMN                    -0.170527   0.196775  -0.867
## LabelE                   1.230121   0.108655  11.321
## genderM                 -0.796528   0.170989  -4.658
## block2:BBBB              0.314092   0.117970   2.662
## block4:BBBB             -0.246985   0.117668  -2.099
## block2:AFMN              0.623770   0.122010   5.112
## block4:AFMN             -0.232500   0.121342  -1.916
## BBBB:AFMN               -0.002289   0.271234  -0.008
## block2:LabelE           -0.043551   0.122072  -0.357
## block4:LabelE           -0.101170   0.121639  -0.832
## BBBB:LabelE             -0.189121   0.118295  -1.599
## AFMN:LabelE              0.271842   0.122037   2.228
## block2:BBBB:AFMN        -0.381098   0.170163  -2.240
## block4:BBBB:AFMN         0.348422   0.169413   2.057
## block2:BBBB:LabelE      -0.093649   0.167005  -0.561
## block4:BBBB:LabelE       0.328207   0.166852   1.967
## block2:AFMN:LabelE       0.130504   0.172402   0.757
## block4:AFMN:LabelE       0.329845   0.172193   1.916
## BBBB:AFMN:LabelE        -0.168344   0.169557  -0.993
## block2:BBBB:AFMN:LabelE -0.032519   0.240300  -0.135
## block4:BBBB:AFMN:LabelE -0.489136   0.239892  -2.039
## 
## Correlation matrix not shown by default, as p = 25 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
library(lme4)
f2barkallbl <- lmer(F2Bark ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = df)
summary(f2barkallbl)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Bark ~ block * BB * AF * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: df
## 
## REML criterion at convergence: 5195
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.4683 -0.5559  0.0047  0.6209  3.7439 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 0.13125  0.3623  
##  word     (Intercept) 0.09871  0.3142  
##  Residual             0.33280  0.5769  
## Number of obs: 2847, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                         Estimate Std. Error t value
## (Intercept)             13.53089    0.21657  62.477
## block2                  -0.03860    0.07609  -0.507
## block4                  -0.16534    0.07559  -2.187
## BBBB                    -0.23626    0.15582  -1.516
## AFMN                     0.02184    0.16261   0.134
## LabelE                  -0.75914    0.26768  -2.836
## genderM                 -0.88032    0.13936  -6.317
## block2:BBBB             -2.56574    0.10427 -24.606
## block4:BBBB              0.06241    0.10401   0.600
## block2:AFMN             -0.20012    0.10784  -1.856
## block4:AFMN              0.09089    0.10725   0.847
## BBBB:AFMN                0.31109    0.22419   1.388
## block2:LabelE           -0.09628    0.10790  -0.892
## block4:LabelE            0.04710    0.10751   0.438
## BBBB:LabelE              0.08442    0.10456   0.807
## AFMN:LabelE             -0.07222    0.10787  -0.670
## block2:BBBB:AFMN        -0.21673    0.15040  -1.441
## block4:BBBB:AFMN        -0.16465    0.14974  -1.100
## block2:BBBB:LabelE       0.73355    0.14761   4.969
## block4:BBBB:LabelE       0.03067    0.14748   0.208
## block2:AFMN:LabelE       0.17939    0.15238   1.177
## block4:AFMN:LabelE       0.03849    0.15220   0.253
## BBBB:AFMN:LabelE        -0.10261    0.14987  -0.685
## block2:BBBB:AFMN:LabelE -0.12610    0.21240  -0.594
## block4:BBBB:AFMN:LabelE -0.06195    0.21204  -0.292
## 
## Correlation matrix not shown by default, as p = 25 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it

Ridge plots

ridge plots for baseline description

#in hertz
library(ggplot2)
library(ggridges)
library(tidyr)
## 
## Attaching package: 'tidyr'
## The following objects are masked from 'package:Matrix':
## 
##     expand, pack, unpack
#define color-blindness-friendly colors
vowelcolor <- c("#0072B2", "#CC79A7")

ridgeBaselinepivot <- df |> filter(block == "1") |> 
  pivot_longer(
    cols = c("F1Hz","F2Hz"), 
    names_to = "formant", 
    values_to = "Hertz",
  )
#head(ridgeBaselinepivot)

ggplot(ridgeBaselinepivot, aes(x = Hertz, y = formant, fill = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)+
  ggtitle("formant values at pretest, pooled data")
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
## Picking joint bandwidth of 37.6

#ggsave("ridgeBlock1pooled.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)


#alternatively
ridgebaseline <- df |> filter(block == "1")
colors <- c("F1Hz" = "#0072B2", "F2Hz" = "#CC79A7")
ggplot(ridgebaseline, aes(y = Label)) +
  geom_density_ridges(aes(x = F1Hz, fill = "F1Hz"), alpha = 0.6, scale = 1) + 
  geom_density_ridges(aes(x = F2Hz, fill = "F2Hz"), alpha = 0.6, scale = 1)+
  #scale_fill_manual(values = "#0072B2")+
  theme_ridges() +labs(x = "Hz", y = "phoneme", fill = "Legend")#+
## Picking joint bandwidth of 21.2
## Picking joint bandwidth of 54.1

  #ggtitle("formant values at pretest, pooled data")
#ggsave("ridgeBlock1pooled.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)

ridge plots for RQ1

#in hertz

#AF, F1
afdf <- df |> filter((AF == "AF" & block == "1") | (AF == "AF" & block == "2"))

ggplot(afdf, aes(x = F1Hz, y = block, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1.2) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)
## Picking joint bandwidth of 29.2

  #+ggtitle("F1 in two vowels between groups in each test block, with regular auditory feedback")
  
#ggsave("ridgeF1BlockXBB*vowel_AF.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)

#AF, F2
ggplot(afdf, aes(x = F2Hz, y = block, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1.2) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)
## Picking joint bandwidth of 71.2

  #+ggtitle("formant values in two vowels between groups in each test block, with regular auditory feedback")

#ggsave("ridgeF2BlockXBB*vowel_AF.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)


# MN F1
mndf <- df |> filter(AF == "MN")
ggplot(mndf, aes(x = F1Hz, y = block, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1.2) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)
## Picking joint bandwidth of 27.3

  #+ggtitle("formant values in two vowels between groups in each test block, with masking noise")
  
#ggsave("ridgeF1BlockXBB*vowel_MN.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)

#MN F2
ggplot(mndf, aes(x = F2Hz, y = block, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1.2) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)
## Picking joint bandwidth of 65.2

  #+ggtitle("formant values in two vowels between groups in each test block, with masking noise")
  
#ggsave("ridgeF2BlockXBB*vowel_MN.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)

after the meeting on Mar 18, WE ARE SEPARATING THE VOWELS and removing block 4

#AF, F1 vowel E
rq1e <- df |> filter((AF == "AF" & Label == "E" & block == "1") | (AF == "AF" & Label == "E" & block == "2"))

p1 <- ggplot(rq1e, aes(x = F1Hz, y = block, fill = BB)) +
  geom_density_ridges(alpha = 0.6, scale = 1.0) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)+
  ggtitle("vowel E")

#AF, F1 vowel I 
rq1e <- df |> filter((AF == "AF" & Label == "I" & block == "1") | (AF == "AF" & Label == "I" & block == "2"))

p2 <- ggplot(rq1e, aes(x = F1Hz, y = block, fill = BB)) +
  geom_density_ridges(alpha = 0.6, scale = 1.0) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)+
  ggtitle("vowel I")

p1 + p2
## Picking joint bandwidth of 35.5
## Picking joint bandwidth of 22.9

ridge plots for RQ2

#BB*AF at block 2 because that is the only significant block
#F1
ggplot(df, aes(x = F1Hz, y = AF, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1.2) +
  theme_ridges() +
  scale_fill_manual(values = vowelcolor)
## Picking joint bandwidth of 23.6

  #+ggtitle("formant values in two vowels between groups in each test block, with masking noise")
  
#ggsave("ridgeF1Block*BB_block2.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
#hyper articulation in the MN condition because Lombard?

#F2
ggplot(df, aes(x = F2Hz, y = AF, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6, scale = 1.2) +
  theme_ridges() +
  #scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)
## Picking joint bandwidth of 77.1

  #+ggtitle("formant values in two vowels between groups in each test block, with masking noise")
  
#ggsave("ridgeF2Block*BB_block2.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)

ridge plots for RQ3

#AF

#reshaping data
library(tidyr)
ridgedfaf <- df |> filter(block == "4", AF == "AF") |> 
  pivot_longer(
    cols = c("F1Hz","F2Hz"), 
    names_to = "formant", 
    values_to = "Hertz",
  )
head(ridgedfaf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_10_… 10    kigg… 4        13 I       216      4     14 F      BB    AF   
## 2 subj_10_… 10    kigg… 4        13 I       216      4     14 F      BB    AF   
## 3 subj_10_… 10    kigg… 4        17 I       212      4     14 F      BB    AF   
## 4 subj_10_… 10    kigg… 4        17 I       212      4     14 F      BB    AF   
## 5 subj_10_… 10    kigg… 4        26 I       223      4     14 F      BB    AF   
## 6 subj_10_… 10    kigg… 4        26 I       223      4     14 F      BB    AF   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
ggplot(ridgedfaf, aes(x = Hertz, y = formant, fill = BB, linetype = Label)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)+
  ggtitle("formant values at block 4, for AF group")
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
## Picking joint bandwidth of 47.3

ggsave("ridgeBlock4AF.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
## Saving 7 x 5 in image
## Picking joint bandwidth of 47.3
#MN
#reshaping data
library(tidyr)
ridgedfaf <- df |> filter(block == "4", AF == "MN") |> 
  pivot_longer(
    cols = c("F1Hz","F2Hz"), 
    names_to = "formant", 
    values_to = "Hertz",
  )
head(ridgedfaf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_11_… 11    kigg… 4        12 I       230      4     14 F      NB    MN   
## 2 subj_11_… 11    kigg… 4        12 I       230      4     14 F      NB    MN   
## 3 subj_11_… 11    kigg… 4        41 I       227      4     14 F      NB    MN   
## 4 subj_11_… 11    kigg… 4        41 I       227      4     14 F      NB    MN   
## 5 subj_11_… 11    kigg… 4         6 I       224      4     14 F      NB    MN   
## 6 subj_11_… 11    kigg… 4         6 I       224      4     14 F      NB    MN   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
ggplot(ridgedfaf, aes(x = Hertz, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Hertz","F2Hertz")) +
  scale_fill_manual(values = vowelcolor)+
  ggtitle("formant values at block 4, for MN group")
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
## Picking joint bandwidth of 49.3

ggsave("ridgeBlock4MN.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
## Saving 7 x 5 in image
## Picking joint bandwidth of 49.3
#reshaping data
library(tidyr)
ridgedf <- df |> filter(block == "2", AF == "AF") |> 
  pivot_longer(
    cols = c("F1Bark","F2Bark"), 
    names_to = "formant", 
    values_to = "Bark",
  )
head(ridgedf)
## # A tibble: 6 × 14
##   fileName    subj  word  block   seq Label  F0Hz  F1Hz  F2Hz gender BB    AF   
##   <chr>       <chr> <chr> <fct> <dbl> <fct> <dbl> <dbl> <dbl> <fct>  <fct> <fct>
## 1 subj_10_ki… 10    kigg… 2        28 I       245   504  1326 F      BB    AF   
## 2 subj_10_ki… 10    kigg… 2        28 I       245   504  1326 F      BB    AF   
## 3 subj_10_ki… 10    kigg… 2        52 I       236   460   953 F      BB    AF   
## 4 subj_10_ki… 10    kigg… 2        52 I       236   460   953 F      BB    AF   
## 5 subj_10_pi… 10    piff… 2        10 I       234   379  1099 F      BB    AF   
## 6 subj_10_pi… 10    piff… 2        10 I       234   379  1099 F      BB    AF   
## # ℹ 2 more variables: formant <chr>, Bark <dbl>
library(ggplot2)
library(ggridges)
#define color-blindness-friendly colors
color <- c("#0072B2", "#CC79A7")
ggplot(ridgedf, aes(x = Bark, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Bark","F2Bark")) +
  scale_fill_manual(values = color)+
  ggtitle("formant values at block 2, for AF condition")
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
## Picking joint bandwidth of 0.251

#ggsave("ridgeBlock2AFBark.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
#reshaping data
library(tidyr)
ridgedf <- df |> filter(block == "2", AF == "MN") |> 
  pivot_longer(
    cols = c("F1Hz","F2Hz"), 
    names_to = "formant", 
    values_to = "Hertz",
  )
head(ridgedf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 2 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 3 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 4 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 5 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## 6 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
library(ggplot2)
library(ggridges)
#define color-blindness-friendly colors
color <- c("#0072B2", "#CC79A7")
ggplot(ridgedf, aes(x = Hertz, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Hz","F2Hz")) +
  scale_fill_manual(values = color)+
ggtitle("formant values at block 2, for MN condition")
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
## Picking joint bandwidth of 53.6

#ggsave("ridgeBlock2MN.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
#reshaping data
library(tidyr)
ridge4af <- df |> filter(block == "4", AF == "AF") |> 
  pivot_longer(
    cols = c("F1Hz","F2Hz"), 
    names_to = "formant", 
    values_to = "Hertz",
  )
head(ridgedf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 2 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 3 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 4 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 5 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## 6 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
library(ggplot2)
library(ggridges)
#define color-blindness-friendly colors
color <- c("#0072B2", "#CC79A7")
ggplot(ridge4af, aes(x = Hertz, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Hz","F2Hz")) +
  ggtitle("formant values at block 4, for AF condition")
## Picking joint bandwidth of 51

  scale_fill_manual(values = color)
## <ggproto object: Class ScaleDiscrete, Scale, gg>
##     aesthetics: fill
##     axis_order: function
##     break_info: function
##     break_positions: function
##     breaks: waiver
##     call: call
##     clone: function
##     dimension: function
##     drop: TRUE
##     expand: waiver
##     get_breaks: function
##     get_breaks_minor: function
##     get_labels: function
##     get_limits: function
##     get_transformation: function
##     guide: legend
##     is_discrete: function
##     is_empty: function
##     labels: waiver
##     limits: NULL
##     make_sec_title: function
##     make_title: function
##     map: function
##     map_df: function
##     n.breaks.cache: NULL
##     na.translate: TRUE
##     na.value: grey50
##     name: waiver
##     palette: function
##     palette.cache: NULL
##     position: left
##     range: environment
##     rescale: function
##     reset: function
##     train: function
##     train_df: function
##     transform: function
##     transform_df: function
##     super:  <ggproto object: Class ScaleDiscrete, Scale, gg>
#ggsave("ridgeBlock4AF.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
#in bark
library(tidyr)
ridge4af <- df |> filter(block == "4", AF == "AF") |> 
  pivot_longer(
    cols = c("F1Bark","F2Bark"), 
    names_to = "formant", 
    values_to = "Bark",
  )
head(ridgedf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 2 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 3 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 4 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 5 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## 6 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
library(ggplot2)
library(ggridges)
#define color-blindness-friendly colors
color <- c("#0072B2", "#CC79A7")
ggplot(ridge4af, aes(x = Bark, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Bark","F2Bark")) +
  ggtitle("formant values at block 4, for AF condition")
## Picking joint bandwidth of 0.247

  scale_fill_manual(values = color)
## <ggproto object: Class ScaleDiscrete, Scale, gg>
##     aesthetics: fill
##     axis_order: function
##     break_info: function
##     break_positions: function
##     breaks: waiver
##     call: call
##     clone: function
##     dimension: function
##     drop: TRUE
##     expand: waiver
##     get_breaks: function
##     get_breaks_minor: function
##     get_labels: function
##     get_limits: function
##     get_transformation: function
##     guide: legend
##     is_discrete: function
##     is_empty: function
##     labels: waiver
##     limits: NULL
##     make_sec_title: function
##     make_title: function
##     map: function
##     map_df: function
##     n.breaks.cache: NULL
##     na.translate: TRUE
##     na.value: grey50
##     name: waiver
##     palette: function
##     palette.cache: NULL
##     position: left
##     range: environment
##     rescale: function
##     reset: function
##     train: function
##     train_df: function
##     transform: function
##     transform_df: function
##     super:  <ggproto object: Class ScaleDiscrete, Scale, gg>
#reshaping data
library(tidyr)
ridge4mn <- df |> filter(block == "4", AF == "MN") |> 
  pivot_longer(
    cols = c("F1Hz","F2Hz"), 
    names_to = "formant", 
    values_to = "Hertz",
  )
head(ridgedf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 2 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 3 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 4 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 5 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## 6 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
library(ggplot2)
library(ggridges)
#define color-blindness-friendly colors
color <- c("#0072B2", "#CC79A7")
ggplot(ridge4mn, aes(x = Hertz, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Hz","F2Hz")) +
  ggtitle("formant values at block 4, for MN condition")
## Picking joint bandwidth of 49.3

  scale_fill_manual(values = color)
## <ggproto object: Class ScaleDiscrete, Scale, gg>
##     aesthetics: fill
##     axis_order: function
##     break_info: function
##     break_positions: function
##     breaks: waiver
##     call: call
##     clone: function
##     dimension: function
##     drop: TRUE
##     expand: waiver
##     get_breaks: function
##     get_breaks_minor: function
##     get_labels: function
##     get_limits: function
##     get_transformation: function
##     guide: legend
##     is_discrete: function
##     is_empty: function
##     labels: waiver
##     limits: NULL
##     make_sec_title: function
##     make_title: function
##     map: function
##     map_df: function
##     n.breaks.cache: NULL
##     na.translate: TRUE
##     na.value: grey50
##     name: waiver
##     palette: function
##     palette.cache: NULL
##     position: left
##     range: environment
##     rescale: function
##     reset: function
##     train: function
##     train_df: function
##     transform: function
##     transform_df: function
##     super:  <ggproto object: Class ScaleDiscrete, Scale, gg>
#ggsave("ridgeBlock4MN.png", plot = last_plot(), device = NULL, scale = 1,dpi = 600)
#reshaping data
library(tidyr)
ridge4mn <- df |> filter(block == "4", AF == "MN") |> 
  pivot_longer(
    cols = c("F1Bark","F2Bark"), 
    names_to = "formant", 
    values_to = "Bark",
  )
head(ridgedf)
## # A tibble: 6 × 14
##   fileName  subj  word  block   seq Label  F0Hz F1Bark F2Bark gender BB    AF   
##   <chr>     <chr> <chr> <fct> <dbl> <fct> <dbl>  <dbl>  <dbl> <fct>  <fct> <fct>
## 1 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 2 subj_11_… 11    kigg… 2        13 I       251      5     14 F      NB    MN   
## 3 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 4 subj_11_… 11    kigg… 2        48 I       251      5     14 F      NB    MN   
## 5 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## 6 subj_11_… 11    kigg… 2        51 I       247      5     14 F      NB    MN   
## # ℹ 2 more variables: formant <chr>, Hertz <dbl>
library(ggplot2)
library(ggridges)
#define color-blindness-friendly colors
color <- c("#0072B2", "#CC79A7")
ggplot(ridge4mn, aes(x = Bark, y = formant, fill = BB)) +
  geom_density_ridges(alpha = 0.6) +
  theme_ridges() +
  scale_fill_discrete(breaks = c ("F1Bark","F2Bark")) +
  ggtitle("formant values at block 4, for MN condition")
## Picking joint bandwidth of 0.242

  scale_fill_manual(values = color)
## <ggproto object: Class ScaleDiscrete, Scale, gg>
##     aesthetics: fill
##     axis_order: function
##     break_info: function
##     break_positions: function
##     breaks: waiver
##     call: call
##     clone: function
##     dimension: function
##     drop: TRUE
##     expand: waiver
##     get_breaks: function
##     get_breaks_minor: function
##     get_labels: function
##     get_limits: function
##     get_transformation: function
##     guide: legend
##     is_discrete: function
##     is_empty: function
##     labels: waiver
##     limits: NULL
##     make_sec_title: function
##     make_title: function
##     map: function
##     map_df: function
##     n.breaks.cache: NULL
##     na.translate: TRUE
##     na.value: grey50
##     name: waiver
##     palette: function
##     palette.cache: NULL
##     position: left
##     range: environment
##     rescale: function
##     reset: function
##     train: function
##     train_df: function
##     transform: function
##     transform_df: function
##     super:  <ggproto object: Class ScaleDiscrete, Scale, gg>

====== old version below =====

#filter for the pre and post conditions
prepost <- db |> filter(block == "Pre" | block == "Post")

f1hzprepost <- lmer(F1Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = prepost)
summary(f1hzprepost)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: prepost
## 
## REML criterion at convergence: 21501.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.6421 -0.5144  0.0187  0.5142 18.3661 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 2348     48.46   
##  word     (Intercept)  284     16.85   
##  Residual             4483     66.95   
## Number of obs: 1902, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)           580.827     14.400  40.336
## blockPre               -2.427      6.040  -0.402
## BBNB                   21.639     14.570   1.485
## LabelI               -142.152     15.037  -9.454
## genderM               -84.508     18.188  -4.646
## blockPre:BBNB           7.080      8.703   0.813
## blockPre:LabelI         8.183      8.550   0.957
## BBNB:LabelI           -19.923      8.695  -2.291
## blockPre:BBNB:LabelI  -13.845     12.293  -1.126
## 
## Correlation of Fixed Effects:
##             (Intr) blckPr BBNB   LabelI gendrM blP:BBNB blP:LI BBNB:L
## blockPre    -0.211                                                   
## BBNB        -0.494  0.208                                            
## LabelI      -0.522  0.202  0.084                                     
## genderM     -0.225  0.000  0.030  0.000                              
## blckPr:BBNB  0.146 -0.694 -0.299 -0.140  0.001                       
## blckPr:LblI  0.149 -0.706 -0.147 -0.286  0.000  0.490                
## BBNB:LabelI  0.146 -0.349 -0.299 -0.281  0.000  0.501    0.495       
## blP:BBNB:LI -0.103  0.491  0.212  0.199 -0.001 -0.708   -0.696 -0.707
f2hzprepost <- lmer(F2Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = prepost)
summary(f2hzprepost)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: prepost
## 
## REML criterion at convergence: 23423.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.2328 -0.5602 -0.0181  0.5161  6.4825 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 13382    115.7   
##  word     (Intercept) 14516    120.5   
##  Residual             12062    109.8   
## Number of obs: 1902, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)          1920.967     73.649  26.083
## blockPre               34.290      9.907   3.461
## BBNB                   24.180     33.102   0.730
## LabelI                214.029     98.875   2.165
## genderM              -254.596     42.814  -5.947
## blockPre:BBNB         -27.480     14.277  -1.925
## blockPre:LabelI         1.544     14.025   0.110
## BBNB:LabelI            12.458     14.263   0.873
## blockPre:BBNB:LabelI   24.773     20.165   1.229
## 
## Correlation of Fixed Effects:
##             (Intr) blckPr BBNB   LabelI gendrM blP:BBNB blP:LI BBNB:L
## blockPre    -0.068                                                   
## BBNB        -0.220  0.150                                            
## LabelI      -0.671  0.050  0.015                                     
## genderM     -0.104  0.000  0.032  0.000                              
## blckPr:BBNB  0.047 -0.694 -0.216 -0.035  0.001                       
## blckPr:LblI  0.048 -0.706 -0.106 -0.071  0.000  0.490                
## BBNB:LabelI  0.047 -0.349 -0.216 -0.070  0.000  0.501    0.495       
## blP:BBNB:LI -0.033  0.491  0.153  0.050 -0.001 -0.708   -0.696 -0.707
#filter for MN1 and AF1, comprare with pretest
bl1 <- db |> filter(block == "Pre" | block == "MN1" | block == "AF1") 
af1subj <- c("2", "3", "5", "6", "8", "9", "10", "12", "15", "17", "19", "26", "30", "31", "33", "35", "38", "40", "42", "43", "46", "48", "50", "51", "52", "53", "54", "56", "58", "60")
bl1af <- bl1 |> mutate(
    AF = case_when(
      subj %in% af1subj ~ "AF",
      TRUE ~ "MN")) |> mutate(
     block = case_when(
      block == "AF1" ~ "2",
      block == "MN1" ~ "2",
      block == "Pre" ~ "1")
   )
      
  


#repeating contrast coding so as to not change results when rerunning this block after running the next block

#contrast coding
bl1af$BB <- as.factor(bl1af$BB)
bl1af$BB <- relevel(bl1af$BB, ref = "NB")

bl1af$Label <- as.factor(bl1af$Label)
bl1af$Label <- relevel(bl1af$Label, ref = "I")

bl1af$block <- as.factor(bl1af$block)
bl1af$block <- relevel(bl1af$block, ref = "1")

bl1af$gender <- as.factor(bl1af$gender)
bl1af$gender <- relevel(bl1af$gender, ref = "F")

f1hzbl1af <- lmer(F1Hz ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = bl1af)
summary(f1hzbl1af)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * AF * Label + gender + (1 | subj) + (1 | word)
##    Data: bl1af
## 
## REML criterion at convergence: 21727.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.8859 -0.5101  0.0280  0.4989  9.6281 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3999.45  63.241  
##  word     (Intercept)   93.05   9.646  
##  Residual             5353.21  73.166  
## Number of obs: 1897, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                          Estimate Std. Error t value
## (Intercept)              452.0889    20.3977  22.164
## block2                     0.5538     9.6518   0.057
## BBBB                       9.3619    25.7308   0.364
## AFMN                     -19.4367    26.8760  -0.723
## LabelE                   147.1272    12.4950  11.775
## genderM                 -102.5361    24.2120  -4.235
## block2:BBBB               36.7324    13.2256   2.777
## block2:AFMN               63.0005    13.6783   4.606
## BBBB:AFMN                -10.0344    37.0205  -0.271
## block2:LabelE             -7.7660    13.6887  -0.567
## BBBB:LabelE              -20.4306    13.2645  -1.540
## AFMN:LabelE               39.5689    13.6825   2.892
## block2:BBBB:AFMN         -24.7403    19.0799  -1.297
## block2:BBBB:LabelE        -9.9069    18.7256  -0.529
## block2:AFMN:LabelE        35.3210    19.3298   1.827
## BBBB:AFMN:LabelE         -24.0924    19.0102  -1.267
## block2:BBBB:AFMN:LabelE  -27.6713    26.9425  -1.027
## 
## Correlation matrix not shown by default, as p = 17 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
f2hzbl1af <- lmer(F2Hz ~ block * BB * AF* Label + gender + (1|subj) + (1|word), data = bl1af)
summary(f2hzbl1af)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * AF * Label + gender + (1 | subj) + (1 | word)
##    Data: bl1af
## 
## REML criterion at convergence: 24145.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.1706 -0.5581 -0.0062  0.5393  5.3927 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 11225    105.95  
##  word     (Intercept)  7947     89.14  
##  Residual             19378    139.20  
## Number of obs: 1897, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                         Estimate Std. Error t value
## (Intercept)             2198.521     61.385  35.816
## block2                    -9.033     18.363  -0.492
## BBBB                     -79.790     43.920  -1.817
## AFMN                       6.701     45.863   0.146
## LabelE                  -255.274     75.089  -3.400
## genderM                 -232.921     40.781  -5.712
## block2:BBBB             -652.633     25.163 -25.936
## block2:AFMN              -55.221     26.024  -2.122
## BBBB:AFMN                 97.900     63.190   1.549
## block2:LabelE            -16.157     26.044  -0.620
## BBBB:LabelE               64.472     25.237   2.555
## AFMN:LabelE                5.340     26.032   0.205
## block2:BBBB:AFMN         -85.842     36.301  -2.365
## block2:BBBB:LabelE       192.300     35.627   5.398
## block2:AFMN:LabelE        37.361     36.776   1.016
## BBBB:AFMN:LabelE         -61.094     36.168  -1.689
## block2:BBBB:AFMN:LabelE    8.542     51.260   0.167
## 
## Correlation matrix not shown by default, as p = 17 > 12.
## Use print(x, correlation=TRUE)  or
##     vcov(x)        if you need it
dbaf<-  db|> filter(block == "AF1" | block == "Pre") |> filter(Label == "E")

ggplot(data = dbaf, aes(x = F2Hz, y = F1Hz, color = block))+
  geom_point(alpha = 0.5)

Interpretation: F1 model:

blockMN1 53.658 9.036 5.938

MN group has 53.758Hz higher F1 at test compared to pretest (whereas AF group did not show difference) -> Lombard?

LabelE 167.017 10.450 15.983

/E/ is 167.017Hz higher in F1 than /I/(at pretest).

genderM -98.731 23.301 -4.237

Male speakers’ F1 is 98.731Hz lower than female speakers (at pretest)

blockAF1:BBBB 31.336 12.370 2.533

The F1 difference between NB and BB group is 31Hz bigger at AF1 than at pretest (note that at pretest the BB group did not have the bite block in)

blockMN1:LabelE 47.236 11.855 3.985

The F1 difference between /E/ and /I/ is bigger at MN1 than at pretest (auditory feedback at pretest is AF)

BBBB:LabelE -33.046 9.517 -3.472

The F1 difference between /E/ and /I/ is smaller in the BB group than in the NB group at pretest

blockMN1:BBBB:LabelE -49.059 16.768 -2.926

?

#splitting up MN1 and AF1, compare with pretest respectively
af <- db |> filter(block == "Pre" | block == "AF1")
mn <- db |> filter(block == "Pre" | block == "MN1")

#contrast coding
af$BB <- as.factor(af$BB)
af$BB <- relevel(af$BB, ref = "NB")

af$Label <- as.factor(af$Label)
af$Label <- relevel(af$Label, ref = "I")

af$block <- as.factor(af$block)
af$block <- relevel(af$block, ref = "Pre")

af$gender <- as.factor(af$gender)
af$gender <- relevel(af$gender, ref = "F")

f1hzaf <- lmer(F1Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = af)
summary(f1hzaf)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: af
## 
## REML criterion at convergence: 16221.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.2819 -0.5589  0.0282  0.5470 11.0900 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3238     56.90   
##  word     (Intercept)  204     14.28   
##  Residual             4069     63.79   
## Number of obs: 1445, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)           440.852     14.865  29.657
## blockAF1               10.329      7.846   1.316
## BBBB                    5.255     16.573   0.317
## LabelE                167.312     13.098  12.774
## genderM               -93.417     21.272  -4.392
## blockAF1:BBBB          31.225     10.767   2.900
## blockAF1:LabelE       -27.850     10.317  -2.699
## BBBB:LabelE           -33.366      8.280  -4.030
## blockAF1:BBBB:LabelE    2.991     14.189   0.211
## 
## Correlation of Fixed Effects:
##             (Intr) blcAF1 BBBB   LabelE gendrM blAF1:BBBB bAF1:L BBBB:L
## blockAF1    -0.148                                                     
## BBBB        -0.571  0.136                                              
## LabelE      -0.440  0.170  0.082                                       
## genderM     -0.220 -0.013 -0.031  0.001                                
## blcAF1:BBBB  0.111 -0.729 -0.191 -0.124 -0.003                         
## blckAF1:LbE  0.116 -0.657 -0.103 -0.263 -0.003  0.479                  
## BBBB:LabelE  0.144 -0.269 -0.249 -0.328 -0.001  0.381      0.417       
## bAF1:BBBB:L -0.084  0.478  0.145  0.192  0.003 -0.660     -0.727 -0.584
mn$BB <- as.factor(mn$BB)
mn$BB <- relevel(mn$BB, ref = "NB")

mn$Label <- as.factor(mn$Label)
mn$Label <- relevel(mn$Label, ref = "I")

mn$block <- as.factor(mn$block)
mn$block <- relevel(mn$block, ref = "Pre")

mn$gender <- as.factor(mn$gender)
mn$gender <- relevel(mn$gender, ref = "F")

f1hzmn <- lmer(F1Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = mn)
summary(f1hzmn)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: mn
## 
## REML criterion at convergence: 16195.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.7920 -0.4615  0.0561  0.4755  9.1062 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3457.4   58.80   
##  word     (Intercept)  117.1   10.82   
##  Residual             5611.9   74.91   
## Number of obs: 1404, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)           440.964     14.432  30.554
## blockMN1               53.786      9.226   5.830
## BBBB                    4.803     17.433   0.276
## LabelE                167.281     11.276  14.835
## genderM               -93.159     22.364  -4.166
## blockMN1:BBBB          16.890     13.076   1.292
## blockMN1:LabelE        47.002     12.114   3.880
## BBBB:LabelE           -33.098      9.727  -3.403
## blockMN1:BBBB:LabelE  -49.074     17.135  -2.864
## 
## Correlation of Fixed Effects:
##             (Intr) blcMN1 BBBB   LabelE gendrM blMN1:BBBB bMN1:L BBBB:L
## blockMN1    -0.188                                                     
## BBBB        -0.618  0.152                                              
## LabelE      -0.391  0.238  0.124                                       
## genderM     -0.239  0.017 -0.031  0.003                                
## blcMN1:BBBB  0.129 -0.705 -0.207 -0.168  0.003                         
## blckMN1:LbE  0.140 -0.662 -0.116 -0.359 -0.003  0.467                  
## BBBB:LabelE  0.174 -0.276 -0.278 -0.448 -0.002  0.373      0.417       
## bMN1:BBBB:L -0.099  0.468  0.158  0.254  0.001 -0.661     -0.707 -0.568

Interpretation:

AF model:

blockAF1 10.329 7.846 1.316

in NB group, the F1 (of female speakers) in the AF test condition did not differ from pretest

BBBB 5.255 16.573 0.317

The F1 in /I/ in BB group at pretest does not differ from NB group among female speakers

LabelE 167.312 13.098 12.774

the F1 in /E/ is 167.312 Hz higher than /I/ in the females speakers in the NB group at pretest

genderM -93.417 21.272 -4.392

Male speakers in the NB group have an F1 that is 93.417Hz lower than the female speakers in the NB group at pretest

blockAF1:BBBB 31.225 10.767 2.900

The increase of F1 from pretest to AF1 is 31.225 Hz bigger in the BB group (for female speakers). Since BB group did not differ from NB group at pretest, we can conclude that having a bite block increased the F1 of 31.225 Hz in the AF1 block for female speakers.

blockAF1:LabelE -27.850 10.317 -2.699

The increase of F1 from /I/ to /E/ is 27.850 Hz smaller in the AF (and no bite block, female) group at test block compared to pretest; i.e., the /I/ -/E/ contrast is 27.850 Hz smaller in the AF group at test –> practice effect?

BBBB:LabelE -33.366 8.280 -4.030

At pretest, the increase of F1 from /I/ to /E/ is 33. 366 Hz smaller in the BB group than the NB group. BB group behaves differently at pretest again. But since the F1 in /I/ did not differ between BB and NB group (see result BBBB where t = 0.317), it’s mainly the /E/ that differed between NB and BB group at pretest.

MN model:

blockMN1 53.786 9.226 5.830

For female speakers in the NB group, being in the MN condition increased (from pretest) the F1 of /I/ for 53.786 Hz -> Lombard

BBBB 4.803 17.433 0.276

For female speakers at pretest, the F1 in /I/ does not differ between NB and BB group

LabelE 167.281 11.276 14.835

For female speakers in the NB group, at pretest, the F1 in /E/ is 167.281 Hz higher than /I/

genderM -93.159 22.364 -4.166

At pretest, in the NB group, for vowel /I/, male speakers have an F1 that is 93.159 Hz lower than the female speakers in the same group at the same stage of testing.

blockMN1:BBBB 16.890 13.076 1.292

The increase of F1 from pretest to MN1 (females, vowel /I/) does not differ between BB and NB groups.

blockMN1:LabelE 47.002 12.114 3.880

The increase of F1 from /I/ to /E/ from pretest to MN1 (i.e., the F1 difference between /I/ and /E/ from pretest to MN) is 47.002 Hz bigger –> hyperarticulation in Lombard?

blockMN1:BBBB:LabelE -49.074 17.135 -2.864

The difference between /I/ and /E/ between BB and NB group (the difference of the size of the /I/- /E/ contrast between BB and NB group) is -49.074 Hz at MN1 when compared to pretest. That the BB group has a 49.074 Hz smaller /I/ -/E/ contrast change (pretest to MN1) than the NB group.

#code male as reference level to check whether the BB group have a different F1 at AF1
# (the alternative would be to code the contrast for gender as -0.5/+0.5, which then has the mean of F and M as the reference level. But literature has shown a gender difference in tongue root mobility, so we have reason to distinguish the two)
af$gender <- as.factor(af$gender)
af$gender <- relevel(af$gender, ref = "M")

mn$gender <- as.factor(mn$gender)
mn$gender <- relevel(mn$gender, ref = "M")

f1hzafm <- lmer(F1Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = af)
summary(f1hzafm)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: af
## 
## REML criterion at convergence: 16221.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.2819 -0.5589  0.0282  0.5470 11.0900 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3238     56.90   
##  word     (Intercept)  204     14.28   
##  Residual             4069     63.79   
## Number of obs: 1445, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)           347.435     23.110  15.034
## blockAF1               10.329      7.846   1.316
## BBBB                    5.255     16.573   0.317
## LabelE                167.312     13.098  12.774
## genderF                93.417     21.272   4.392
## blockAF1:BBBB          31.225     10.767   2.900
## blockAF1:LabelE       -27.850     10.317  -2.699
## BBBB:LabelE           -33.366      8.280  -4.030
## blockAF1:BBBB:LabelE    2.991     14.189   0.211
## 
## Correlation of Fixed Effects:
##             (Intr) blcAF1 BBBB   LabelE gendrF blAF1:BBBB bAF1:L BBBB:L
## blockAF1    -0.107                                                     
## BBBB        -0.396  0.136                                              
## LabelE      -0.282  0.170  0.082                                       
## genderF     -0.779  0.013  0.031 -0.001                                
## blcAF1:BBBB  0.069 -0.729 -0.191 -0.124  0.003                         
## blckAF1:LbE  0.072 -0.657 -0.103 -0.263  0.003  0.479                  
## BBBB:LabelE  0.091 -0.269 -0.249 -0.328  0.001  0.381      0.417       
## bAF1:BBBB:L -0.052  0.478  0.145  0.192 -0.003 -0.660     -0.727 -0.584
f1hzmnm <- lmer(F1Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = mn)
summary(f1hzmnm)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: mn
## 
## REML criterion at convergence: 16195.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.7920 -0.4615  0.0561  0.4755  9.1062 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 3457.4   58.80   
##  word     (Intercept)  117.1   10.82   
##  Residual             5611.9   74.91   
## Number of obs: 1404, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)           347.805     23.545  14.772
## blockMN1               53.786      9.226   5.830
## BBBB                    4.803     17.433   0.276
## LabelE                167.281     11.276  14.835
## genderF                93.159     22.364   4.166
## blockMN1:BBBB          16.890     13.076   1.292
## blockMN1:LabelE        47.002     12.114   3.880
## BBBB:LabelE           -33.098      9.727  -3.403
## blockMN1:BBBB:LabelE  -49.074     17.135  -2.864
## 
## Correlation of Fixed Effects:
##             (Intr) blcMN1 BBBB   LabelE gendrF blMN1:BBBB bMN1:L BBBB:L
## blockMN1    -0.099                                                     
## BBBB        -0.408  0.152                                              
## LabelE      -0.237  0.238  0.124                                       
## genderF     -0.804 -0.017  0.031 -0.003                                
## blcMN1:BBBB  0.082 -0.705 -0.207 -0.168 -0.003                         
## blckMN1:LbE  0.083 -0.662 -0.116 -0.359  0.003  0.467                  
## BBBB:LabelE  0.105 -0.276 -0.278 -0.448  0.002  0.373      0.417       
## bMN1:BBBB:L -0.060  0.468  0.158  0.254 -0.001 -0.661     -0.707 -0.568

same results except intercept.

#model plot
data_summary <- function(data, varname, groupnames){
  require(plyr)
  summary_func <- function(x, col){
    c(mean = mean(x[[col]], na.rm=TRUE),
      sd = sd(x[[col]], na.rm=TRUE))
  }
  data_sum<-ddply(data, groupnames, .fun=summary_func,
                  varname)
  data_sum <- rename(data_sum, c("mean" = varname))
 return(data_sum)
}


library(ggplot2)
f1i <- af |> filter(Label == "I")

f1e <- af |> filter(Label == "E")

f1ierr <- data_summary(f1i, varname="F1Hz", 
                    groupnames=c("block", "BB"))
## Loading required package: plyr
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
## 
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
f1eerr <- data_summary(f1e, varname="F1Hz", 
                    groupnames=c("block", "BB"))


p1<- ggplot(data=f1i, aes(x=BB, y=F1Hz, fill=block)) +
  geom_bar(stat="identity", position=position_dodge())+
  labs (title = "F1 of /I/ at pre test and test, in AF condition")

p1 + geom_errorbar(data = f1ierr, aes(ymin=F1Hz-sd, ymax=F1Hz+sd), width=.2,
                 position=position_dodge(.9))

p2 <- ggplot(data=f1e, aes(x=BB, y=F1Hz, fill=block)) +
  geom_bar(stat="identity", position=position_dodge())+
  labs (title = "F1 of /E/ at pre test and test, in AF condition")

p2 + geom_errorbar(data = f1eerr, aes(ymin=F1Hz-sd, ymax=F1Hz+sd), width=.2,
                 position=position_dodge(.9))

#model plot
library(ggplot2)
mni <- mn |> filter(Label == "I")

ggplot(data=mni, aes(x=BB, y=F1Hz, fill=block)) +
  geom_bar(stat="identity", position=position_dodge())+
  labs (title = "F1 of /I/ at pre test and test, in MN condition")

mne <- mn |> filter(Label == "E")

ggplot(data=mne, aes(x=BB, y=F1Hz, fill=block)) +
  geom_bar(stat="identity", position=position_dodge())+
  labs (title = "F1 of /E/ at pre test and test, in MN condition")

#add in error bars
data_summary <- function(data, varname, groupnames){
  require(plyr)
  summary_func <- function(x, col){
    c(mean = mean(x[[col]], na.rm=TRUE),
      sd = sd(x[[col]], na.rm=TRUE))
  }
  data_sum<-ddply(data, groupnames, .fun=summary_func,
                  varname)
  data_sum <- rename(data_sum, c("mean" = varname))
 return(data_sum)
}


f1ierr <- data_summary(f1i, varname="F1Hz", 
                    groupnames=c("block", "BB"))

f1eerr <- data_summary(f1e, varname="F1Hz", 
                    groupnames=c("block", "BB"))

head(f1ierr)
##   block BB     F1Hz        sd
## 1   Pre NB 425.7174  62.73284
## 2   Pre BB 429.4696  62.73190
## 3   AF1 NB 430.3596  60.44468
## 4   AF1 BB 470.5115 101.61234
p <- ggplot(data=f1ierr, aes(x=BB, y=F1Hz, fill=block)) + 
   geom_bar(stat="identity", position=position_dodge()) +
  geom_errorbar(aes(ymin=F1Hz-sd, ymax=F1Hz+sd), width=.2,
                 position=position_dodge(.9))
  
p + scale_fill_brewer(palette="Paired") + theme_minimal()+labs (title = "F1 of /I/ at pre test and test, in AF condition")

library(effects)

plot(effect( "block * BB * Label", f1hzmn))

plot(effect( "block * BB * Label", f1hzaf))

#f2 models
af$gender <- as.factor(af$gender)
af$gender <- relevel(af$gender, ref = "F")
f2hzaf <- lmer(F2Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = af)
summary(f2hzaf)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: af
## 
## REML criterion at convergence: 18372.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.3025 -0.5015 -0.0194  0.4816  5.5072 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 13750    117.3   
##  word     (Intercept) 10159    100.8   
##  Residual             18103    134.5   
## Number of obs: 1445, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)          2202.441     63.558  34.653
## blockAF1               -7.619     16.547  -0.460
## BBBB                  -34.253     34.252  -1.000
## LabelE               -252.224     83.252  -3.030
## genderM              -238.697     43.881  -5.440
## blockAF1:BBBB        -669.195     22.706 -29.472
## blockAF1:LabelE       -19.466     21.763  -0.894
## BBBB:LabelE            35.904     17.466   2.056
## blockAF1:BBBB:LabelE  221.029     29.929   7.385
## 
## Correlation of Fixed Effects:
##             (Intr) blcAF1 BBBB   LabelE gendrM blAF1:BBBB bAF1:L BBBB:L
## blockAF1    -0.073                                                     
## BBBB        -0.276  0.139                                              
## LabelE      -0.655  0.056  0.028                                       
## genderM     -0.106 -0.013 -0.031  0.000                                
## blcAF1:BBBB  0.055 -0.729 -0.195 -0.041 -0.003                         
## blckAF1:LbE  0.057 -0.657 -0.106 -0.087 -0.003  0.479                  
## BBBB:LabelE  0.071 -0.269 -0.254 -0.109 -0.001  0.381      0.417       
## bAF1:BBBB:L -0.042  0.478  0.148  0.064  0.003 -0.660     -0.727 -0.584
f2hzmn <- lmer(F2Hz ~ block * BB * block* Label + gender + (1|subj) + (1|word), data = mn)
summary(f2hzmn)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * block * Label + gender + (1 | subj) + (1 |  
##     word)
##    Data: mn
## 
## REML criterion at convergence: 17676.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.3292 -0.5705 -0.0235  0.5351  5.5431 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 11445    106.98  
##  word     (Intercept)  9678     98.38  
##  Residual             15989    126.45  
## Number of obs: 1404, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                      Estimate Std. Error t value
## (Intercept)           1954.14      70.06  27.894
## blockMN1               -64.91      15.58  -4.165
## BBBB                   -33.97      31.37  -1.083
## LabelE                -252.46      81.19  -3.110
## genderF                250.16      40.47   6.181
## blockMN1:BBBB         -720.16      22.09 -32.603
## blockMN1:LabelE         23.59      20.45   1.154
## BBBB:LabelE             35.95      16.42   2.190
## blockMN1:BBBB:LabelE   168.52      28.92   5.827
## 
## Correlation of Fixed Effects:
##             (Intr) blcMN1 BBBB   LabelE gendrF blMN1:BBBB bMN1:L BBBB:L
## blockMN1    -0.056                                                     
## BBBB        -0.247  0.142                                              
## LabelE      -0.579  0.056  0.027                                       
## genderF     -0.489 -0.016  0.031 -0.001                                
## blcMN1:BBBB  0.046 -0.705 -0.194 -0.039 -0.003                         
## blckMN1:LbE  0.047 -0.662 -0.108 -0.084  0.002  0.467                  
## BBBB:LabelE  0.059 -0.276 -0.261 -0.105  0.002  0.373      0.417       
## bMN1:BBBB:L -0.034  0.468  0.148  0.060 -0.001 -0.660     -0.707 -0.568
plot(effect( "block * BB * Label", f1hzaf))

#prepost model
#splitting up MN1 and AF1, compare with pretest respectively
prepost <- db |> filter(block == "Pre" | block == "Post")

#contrast coding
prepost$BB <- as.factor(prepost$BB)
prepost$BB <- relevel(prepost$BB, ref = "NB")

prepost$Label <- as.factor(prepost$Label)
prepost$Label <- relevel(prepost$Label, ref = "I")

prepost$block <- as.factor(prepost$block)
prepost$block <- relevel(prepost$block, ref = "Pre")

prepost$gender <- as.factor(prepost$gender)
prepost$gender <- relevel(prepost$gender, ref = "F")

f1hzpp <- lmer(F1Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = prepost)
summary(f1hzpp)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: prepost
## 
## REML criterion at convergence: 21501.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.6421 -0.5144  0.0187  0.5142 18.3661 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 2348     48.46   
##  word     (Intercept)  284     16.85   
##  Residual             4483     66.95   
## Number of obs: 1902, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                       Estimate Std. Error t value
## (Intercept)            439.381     14.571  30.154
## blockPost                1.010      6.224   0.162
## BBBB                     5.049     14.561   0.347
## LabelE                 167.737     15.117  11.096
## genderM                -84.508     18.188  -4.646
## blockPost:BBBB          -6.765      8.681  -0.779
## blockPost:LabelE        -5.662      8.832  -0.641
## BBBB:LabelE            -33.768      8.690  -3.886
## blockPost:BBBB:LabelE   13.845     12.293   1.126
## 
## Correlation of Fixed Effects:
##             (Intr) blckPs BBBB   LabelE gendrM blP:BBBB blP:LE BBBB:L
## blockPost   -0.215                                                   
## BBBB        -0.512  0.215                                            
## LabelE      -0.518  0.207  0.089                                     
## genderM     -0.192  0.000 -0.030  0.001                              
## blckPs:BBBB  0.154 -0.717 -0.298 -0.149 -0.001                       
## blckPst:LbE  0.152 -0.705 -0.152 -0.293 -0.002  0.505                
## BBBB:LabelE  0.154 -0.360 -0.298 -0.298 -0.001  0.499    0.510       
## blP:BBBB:LE -0.109  0.506  0.210  0.211  0.001 -0.706   -0.719 -0.707
f2hzpp <- lmer(F2Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = prepost)
summary(f2hzpp)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: prepost
## 
## REML criterion at convergence: 23423.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.2328 -0.5602 -0.0181  0.5161  6.4825 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 13382    115.7   
##  word     (Intercept) 14516    120.5   
##  Residual             12062    109.8   
## Number of obs: 1902, groups:  subj, 54; word, 6
## 
## Fixed effects:
##                       Estimate Std. Error t value
## (Intercept)           2204.760     73.819  29.867
## blockPost              -33.127     10.210  -3.245
## BBBB                   -33.930     33.092  -1.025
## LabelE                -252.803     98.908  -2.556
## genderM               -254.596     42.814  -5.947
## blockPost:BBBB          -2.707     14.240  -0.190
## blockPost:LabelE        26.317     14.489   1.816
## BBBB:LabelE             37.231     14.256   2.612
## blockPost:BBBB:LabelE  -24.773     20.165  -1.229
## 
## Correlation of Fixed Effects:
##             (Intr) blckPs BBBB   LabelE gendrM blP:BBBB blP:LE BBBB:L
## blockPost   -0.070                                                   
## BBBB        -0.229  0.155                                            
## LabelE      -0.670  0.052  0.016                                     
## genderM     -0.089  0.000 -0.032  0.000                              
## blckPs:BBBB  0.050 -0.717 -0.215 -0.037  0.000                       
## blckPst:LbE  0.049 -0.705 -0.109 -0.074 -0.001  0.505                
## BBBB:LabelE  0.050 -0.360 -0.215 -0.075 -0.001  0.499    0.510       
## blP:BBBB:LE -0.035  0.506  0.152  0.053  0.001 -0.706   -0.718 -0.707
#plotting the one significant result
plot(effect( "BB * Label", f1hzpp))
## NOTE: BB:Label is not a high-order term in the model

mn2subj <- c("2", "3", "5", "6", "8", "9", "10", "12", "15", "17", "19", "26", "30", "31", "33", "35", "38", "40", "42", "43", "46", "48", "50", "51", "52", "53", "54", "56", "58", "60")
ppaf <- db |> filter(subj %in% mn2subj)|> filter(block == "Pre" | block == "Post")

ppmn <- db |> filter(!subj %in% mn2subj)|> filter(block == "Pre" | block == "Post")


#change df name
ppaf$BB <- as.factor(ppaf$BB)
ppaf$BB <- relevel(ppaf$BB, ref = "NB")

ppaf$Label <- as.factor(ppaf$Label)
ppaf$Label <- relevel(ppaf$Label, ref = "I")

ppaf$block <- as.factor(ppaf$block)
ppaf$block <- relevel(ppaf$block, ref = "Pre")

ppaf$gender <- as.factor(ppaf$gender)
ppaf$gender <- relevel(ppaf$gender, ref = "F")

ppmn$BB <- as.factor(ppmn$BB)
ppmn$BB <- relevel(ppmn$BB, ref = "NB")

ppmn$Label <- as.factor(ppmn$Label)
ppmn$Label <- relevel(ppmn$Label, ref = "I")

ppmn$block <- as.factor(ppmn$block)
ppmn$block <- relevel(ppmn$block, ref = "Pre")

ppmn$gender <- as.factor(ppmn$gender)
ppmn$gender <- relevel(ppmn$gender, ref = "F")

#run lmers 

ppmnf1 <- lmer(F1Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = ppmn)
summary(ppmnf1)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: ppmn
## 
## REML criterion at convergence: 10241.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.1742 -0.6261  0.0390  0.6322  4.7036 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 2253.4   47.47   
##  word     (Intercept)  279.2   16.71   
##  Residual             4004.9   63.28   
## Number of obs: 918, groups:  subj, 26; word, 6
## 
## Fixed effects:
##                       Estimate Std. Error t value
## (Intercept)           429.0504    17.5832  24.401
## blockPost             -13.0507     8.3471  -1.563
## BBBB                   -0.2766    20.4050  -0.014
## LabelE                187.0542    15.9947  11.695
## genderM               -60.4472    35.7904  -1.689
## blockPost:BBBB         11.3719    11.8186   0.962
## blockPost:LabelE        8.4734    11.8182   0.717
## BBBB:LabelE           -44.9571    11.7788  -3.817
## blockPost:BBBB:LabelE  -4.6205    16.7135  -0.276
## 
## Correlation of Fixed Effects:
##             (Intr) blckPs BBBB   LabelE gendrM blP:BBBB blP:LE BBBB:L
## blockPost   -0.240                                                   
## BBBB        -0.581  0.206                                            
## LabelE      -0.456  0.263  0.108                                     
## genderM     -0.157  0.000  0.000  0.000                              
## blckPs:BBBB  0.169 -0.706 -0.289 -0.186 -0.001                       
## blckPst:LbE  0.169 -0.706 -0.146 -0.369 -0.001  0.499                
## BBBB:LabelE  0.170 -0.357 -0.290 -0.370  0.000  0.500    0.500       
## blP:BBBB:LE -0.120  0.499  0.204  0.261  0.000 -0.707   -0.707 -0.705
ppmnf2 <- lmer(F2Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = ppmn)
summary(ppmnf2)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: ppmn
## 
## REML criterion at convergence: 11344.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.7871 -0.5714 -0.0224  0.5501  5.2096 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 16284    127.6   
##  word     (Intercept) 15379    124.0   
##  Residual             13048    114.2   
## Number of obs: 918, groups:  subj, 26; word, 6
## 
## Fixed effects:
##                       Estimate Std. Error t value
## (Intercept)           2196.729     80.914  27.149
## blockPost               -9.326     15.067  -0.619
## BBBB                    18.426     52.271   0.353
## LabelE                -248.993    102.372  -2.432
## genderM               -134.288     94.958  -1.414
## blockPost:BBBB         -33.548     21.333  -1.573
## blockPost:LabelE         8.859     21.332   0.415
## BBBB:LabelE              3.701     21.261   0.174
## blockPost:BBBB:LabelE  -13.084     30.168  -0.434
## 
## Correlation of Fixed Effects:
##             (Intr) blckPs BBBB   LabelE gendrM blP:BBBB blP:LE BBBB:L
## blockPost   -0.094                                                   
## BBBB        -0.323  0.145                                            
## LabelE      -0.633  0.074  0.021                                     
## genderM     -0.090  0.000  0.000  0.000                              
## blckPs:BBBB  0.066 -0.706 -0.204 -0.052  0.000                       
## blckPst:LbE  0.066 -0.706 -0.103 -0.104  0.000  0.499                
## BBBB:LabelE  0.067 -0.357 -0.204 -0.104  0.000  0.500    0.500       
## blP:BBBB:LE -0.047  0.499  0.144  0.073  0.000 -0.707   -0.707 -0.705
ppaff1 <- lmer(F1Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = ppaf)
summary(ppaff1)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F1Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: ppaf
## 
## REML criterion at convergence: 11150.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.5734 -0.4274 -0.0041  0.4300 17.4702 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept) 2568.4   50.68   
##  word     (Intercept)  279.3   16.71   
##  Residual             4758.7   68.98   
## Number of obs: 984, groups:  subj, 28; word, 6
## 
## Fixed effects:
##                       Estimate Std. Error t value
## (Intercept)            450.991     18.954  23.794
## blockPost               14.974      9.039   1.657
## BBBB                     9.194     21.138   0.435
## LabelE                 147.979     16.427   9.008
## genderM                -98.369     22.729  -4.328
## blockPost:BBBB         -24.441     12.438  -1.965
## blockPost:LabelE       -18.871     12.858  -1.468
## BBBB:LabelE            -21.214     12.506  -1.696
## blockPost:BBBB:LabelE   31.051     17.638   1.760
## 
## Correlation of Fixed Effects:
##             (Intr) blckPs BBBB   LabelE gendrM blP:BBBB blP:LE BBBB:L
## blockPost   -0.240                                                   
## BBBB        -0.585  0.215                                            
## LabelE      -0.431  0.276  0.118                                     
## genderM     -0.277  0.000 -0.038  0.002                              
## blckPs:BBBB  0.174 -0.727 -0.294 -0.201  0.000                       
## blckPst:LbE  0.169 -0.703 -0.151 -0.396 -0.002  0.511                
## BBBB:LabelE  0.174 -0.363 -0.293 -0.407 -0.002  0.498    0.520       
## blP:BBBB:LE -0.123  0.512  0.208  0.289  0.001 -0.705   -0.729 -0.709
ppaff2 <- lmer(F2Hz ~ block * BB * Label + gender + (1|subj) + (1|word), data = ppaf)
summary(ppaff2)
## Linear mixed model fit by REML ['lmerMod']
## Formula: F2Hz ~ block * BB * Label + gender + (1 | subj) + (1 | word)
##    Data: ppaf
## 
## REML criterion at convergence: 11982.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.0531 -0.5362 -0.0269  0.4896  7.0453 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  subj     (Intercept)  9952     99.76  
##  word     (Intercept) 13724    117.15  
##  Residual             10888    104.35  
## Number of obs: 984, groups:  subj, 28; word, 6
## 
## Fixed effects:
##                       Estimate Std. Error t value
## (Intercept)            2208.41      74.42  29.674
## blockPost               -56.61      13.67  -4.140
## BBBB                    -78.52      40.11  -1.958
## LabelE                 -256.12      96.65  -2.650
## genderM                -276.74      44.27  -6.251
## blockPost:BBBB           27.38      18.81   1.456
## blockPost:LabelE         43.20      19.45   2.221
## BBBB:LabelE              66.89      18.92   3.536
## blockPost:BBBB:LabelE   -37.25      26.68  -1.396
## 
## Correlation of Fixed Effects:
##             (Intr) blckPs BBBB   LabelE gendrM blP:BBBB blP:LE BBBB:L
## blockPost   -0.092                                                   
## BBBB        -0.283  0.171                                            
## LabelE      -0.649  0.071  0.024                                     
## genderM     -0.137  0.000 -0.039  0.000                              
## blckPs:BBBB  0.067 -0.727 -0.235 -0.052  0.000                       
## blckPst:LbE  0.065 -0.703 -0.120 -0.102 -0.002  0.511                
## BBBB:LabelE  0.067 -0.363 -0.233 -0.105 -0.001  0.498    0.520       
## blP:BBBB:LE -0.047  0.512  0.165  0.074  0.001 -0.705   -0.729 -0.709